Comments (5)
Hey @JoeGaffney, sorry for the issue! We'll investigate it and find out what went wrong. Filters had to be connected bi-directionally. Maybe something changed in the <DataGrid />
API or we may have missed something during our refactors. Thank you for providing a workaround 🚀
from refine.
Hey @aliemir no problem. It's super coinvent that you are providing both server and client side filtering in with the useDataGrid, its a big time saver.
from refine.
Hey @JoeGaffney, worked on this issue for a while and come to a conclusion for now. We're supporting both Pro and community versions of the MUI Data Grid with our @refinedev/mui
's useDataGrid
hook.
In the community version, data grid is limited to single column filtering. With Refine, you can place your filters outside of data grid to support multiple filters on multiple fields. When we try to reflect the changes in filters
of Refine to filter model of data grid, we end up messing with the current state of the filters and filtering in column headers break. For the pro version it works without issues since it supports multiple fields to be filtered in the same time.
Reflecting changes on the data grid may break the existing apps using both column headers to filter and provide filtering with external elements. In the future we may introduce an API to pick and reflect only the wanted fields on the filter model but for now we've decided on not taking any actions here.
Do you have multiple filters on your data grid? Do you manage those in column headers or do you manage them outside of the data grid? We'd like to know your use case better if you can provide anything more and maybe we can try to implement a different solution for it. 🚀
As a workaround, yours work well with single fields and I can suggest another one without changing the filterModel
prop. <DataGrid />
component accepts an apiRef
prop which you can generate a ref using useGridApiRef
and set filters and sorters using the ref.
Let me know if we can help you with any other issue 🙏
from refine.
Hey @aliemir I was just using the one filter using the basic version.
I also did notice some issue with this approach that I can not always manually changes the filters after. I will look into the useGridApiRef
from refine.
Thanks @aliemir using the ref works perfectly and simplfies the code
from refine.
Related Issues (20)
- [BUG] MUI Inferencer sets all fields to required HOT 1
- [BUG] Exmaple project cannot view HOT 3
- [BUG] nextjs 14 upgrade breaks imports HOT 4
- [FEAT]: Supabase Data Provider should filter array column by array HOT 5
- [FEAT] Support TypedDocumentNode for GraphQL data-provider HOT 6
- [BUG] Supabase token refresh not handled in Next.js example HOT 1
- [FEAT] Serving from a subdirectory HOT 2
- [DOC]: clarify rowCount retrieval and improve pagination examples
- [FEAT] i18n option when using cli to create project
- [BUG] After "npm create refine-app@latest" refine stucked in the build step forever HOT 2
- [BUG] Module '"@refinedev/antd"' has no exported member 'Create' ('List' and so on). HOT 1
- [BUG] npm create refine-app@latest fails with Found 58 errors in 12 files. HOT 2
- [BUG] Named export 'SyncOutlined' not found. HOT 16
- Date range table filter in Ant Design is broken HOT 11
- [BUG] Default GraphQL DataProvider GetListResponse from 'count' property not possible. HOT 2
- [FEAT] Default GraphQL DataProvider cannot function on deeper graphs HOT 3
- [BUG] Arrows directions in RTL (Right to Left) HOT 5
- [FEAT] Have an optional to reset from when close modal inside `useModalForm` HOT 5
- [FEAT] Ant Design's `<ThemedSiderV2>` change button position under mobile HOT 1
- Login is showing email not found for '[email protected]' being used in javascript mastery project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from refine.