import React from 'react' ; import { CellProps , WithClassname } from '@jsonforms/core' ; import { Checkbox } from '@mui/material' ; import merge from 'lodash/merge' ; export const MuiCheckbox = React . memo ( ( props ) => { const { data , className , id , enabled , uischema , path , handleChange , config } = props ; const appliedUiSchemaOptions = merge ( { } , config , uischema . options ) ; const inputProps = { autoFocus : ! ! appliedUiSchemaOptions . focus } ; const checked = ! ! data ; return ( < Checkbox checked = { checked } onChange = { ( _ev , isChecked ) => handleChange ( path , isChecked ) } className = { className } id = { id } disabled = { ! enabled } inputProps = { inputProps } / > ) ; } ) ;