BoundSwitch

BoundSwitch binds a MUI Switch component to the data object found in the nearest DataObjectProvider. Usage is just like the MUI Switch, except you must give a field name in the field property instead of passing value/onChange properties.

API

import { SwitchProps } from "@mui/material";
export declare type BoundSwitchProps = SwitchProps & {
  field: string;
};

export declare function BoundSwitch(props: BoundSwitchProps): JSX.Element;

Last updated

Was this helpful?