Renders a Switch field component.

  • Parameters

    • props: ISwitchFieldProps<any, any> & ISwitchFieldPrivate<any>

      The properties for the Switch field.

      Represents the properties for a switch field component.

      • Optionaldisabled?: boolean

        Represents the 'disabled' property of a field in a form.

        The data type associated with the form.

        The payload type associated with the form.

      • OptionalgroupRef?: (element?: null | HTMLDivElement) => void

        Retrieves the 'groupRef' property from an object based on the given type.

      • Optionalreadonly?: boolean

        Represents the readonly property of an IField object.

      • OptionalswitchActiveLabel?: string

        Gets the value of the switchActiveLabel property from the given field.

        The field object from which to get the switchActiveLabel property.

        • The value of the switchActiveLabel property.
      • OptionalswitchNoColor?: boolean

        The switchNoColor property of the Field interface.

      • Optionaltitle?: string

        Retrieves the value of the 'title' property from an object of type IField<Data, Payload>.

        The type of the data contained in the field.

        The type of the payload associated with the field.

        An object of type IField<Data, Payload>.

        • The value of the 'title' property from the given field.

      Represents a private interface for a switch field.

      • onChange: (v: any, config?: { skipReadonly?: boolean }) => void
      • value: any

    Returns Element

    A Switch component wrapped in a SwitchField component.

Properties

Properties

displayName: string