skip to Main Content

Reactjs – React Material UI Checkbox how to change checked

I have many checkboxes, and use them to set table columns. It's look like const [fields, setFields] = useState<Set<string>>(new Set(["name"])); const handleChangeFilter = (event: ChangeEvent<HTMLInputElement>) => { if (fields.has(event.target.value)) { fields.delete(event.target.value) } else { fields.add(event.target.value) } setFields(fields) }; {filters.map((field) =>…

VIEW QUESTION
Back To Top
Search