I want to get the filtered data from MUI DataGrid Table and want to send it to backend Please suggest how should I save the filter condition data .
export default function MultiFilteringGrid() {
const { data } = useDemoData({
dataSet: 'Commodity',
rowLength: 200,
maxColumns: 6,
});
const [filterModel, setFilterModel] = React.useState({
items: [
{ id: 1, columnField: 'commodity', operatorValue: 'contains', value: 'rice' },
{ id: 2, columnField: 'quantity', operatorValue: '>=', value: '20000' },
],
});
return (
<div style={{ height: 400, width: '100%' }}>
<DataGridPro
{...data}
filterModel={filterModel}
onFilterModelChange={(model) => setFilterModel(model)}
/>
</div>
);
}
