-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Add an example for a fully customized filter panel outside the grid #4023
Comments
Those component uses hooks to access contexts containing See #2522 for context. It's a major subject which is linked to all our discussions around plugins / headless api / etc... |
One step closer: https://codesandbox.io/s/datagriddemo-material-demo-forked-fyeb80?file=/demo.tsx @flaviendelangle raised a great point, I got tricked when I used For #2522 maybe it could make sense to allow more flexibility, the same way it's done in the tabs: https://mui.com/components/tabs/#experimental-api <TabContext value={value}>
<Box sx={{ borderBottom: 1, borderColor: 'divider' }}>
<TabList onChange={handleChange} aria-label="lab API tabs example">
<Tab label="Item One" value="1" />
<Tab label="Item Two" value="2" />
<Tab label="Item Three" value="3" />
</TabList>
</Box>
<TabPanel value="1">Item One</TabPanel>
<TabPanel value="2">Item Two</TabPanel>
<TabPanel value="3">Item Three</TabPanel>
</TabContext> |
I don't have a strong reason why |
Motivation
Users are looking for a way to fully customize the filter panel and their inputs.
The panel only works inside the DataGrid currently, but we can support users to build their own filters with a good example.
The following codesandbox is a start:
https://codesandbox.io/s/controlledfilters-static-filter-field-0fvyev?file=/demo.js
Ideally, we should also provide an example/way of reusing our internal filter components to support these use cases without a lot of rewriting. But after a quick validation with @alexfauquette, right now, it's not possible to reuse the components outside the Grid (maybe after #3719).
The text was updated successfully, but these errors were encountered: