It will have an Apply button (variant: solid, color: primary)
It have a Reset button (variant: outlined, color: primary)
All the Input Fields should have white color instead of MUI Joy default color
JSX Structure
Accordion
form
... form elements that are passed as children(Input, Select, Autocomplete, Checkbox)
Apply button (submits the form)
Reset button (resets the form)
Filtering Logic
Updates the URL searchParams
Loads the webpage with URLSearchparams
Assumption: URLSearchparams are dealt by the function /action that fetches data
it should accept a setLoading() useState set function as prop that it calls on submission of the Filter form and sets the loading state to true so that the loading variable can be used to control the state of other components inside that page
This is one example code for a Filter component written:
One of the major Disadvantage of this component is that <AutoComplete> componen's valua is noy processed correctly and is dealt with using useState instead of submitting the form
loading
variable can be used to control the state of other components inside that pagehttps://www.loom.com/share/d973407f97d5406c8c39ced2102bfad0
This is one example code for a Filter component written: One of the major Disadvantage of this component is that
<AutoComplete>
componen's valua is noy processed correctly and is dealt with using useState instead of submitting the form