components.form.fields.multiple.MultipleTableHeaderSelectCell.js Maven / Gradle / Ivy
import { TableCell, Checkbox } from '@mui/material'
import { useFieldInfo } from 'hooks/field'
const MultipleTableHeaderSelectCell = ({rows, selected, setSelected}) => {
const { info } = useFieldInfo()
const mode = info.field.mode
return mode === "open" ? (
<>
>
) : null
}
export const MultipleCheckBox = ({rows, selected, setSelected}) => {
const handleChange = (event, value) => {
if (value)
setSelected(_.range(rows.length))
else
setSelected([])
}
const indeterminate = Boolean(selected.length && selected.length < rows.length)
const checked = Boolean(rows.length > 0 && selected.length === rows.length)
return (
)
}
export default MultipleTableHeaderSelectCell