How to disable some filter operators?
My server only supports the
eq
filter operator and I want to disable the other operators. I don't want my users accidentally select an unsupported operator in the filter form. How can I do that? btw I'm using material ui.4 Replies
Hey @amirhhashemi 👋,
Welcome, we are glad to see you ⚡️ You can create new data provider or override an existing one
Doc: https://refine.dev/docs/faq/#how-i-can-override-specific-function-of-data-providers
Example: https://github.com/refinedev/real-world-example/blob/main/src/dataProvider.ts#L40
FAQ | refine
How can I change the form data before submitting it to the API?
GitHub
real-world-example/dataProvider.ts at main · refinedev/real-world-e...
Exemplary real world application built with refine - real-world-example/dataProvider.ts at main · refinedev/real-world-example
foreign-sapphire•2y ago
Hey @Omer. Thank you for the swift response and your amazing library. I'm glad to be here. Sorry if I didn't clearly asked my question. I want to disable filter operators "in the filter form". I don't want other filter operators appear in the filter form. Can I do that? ignoring other filter operators in data provider is good enough for me but it would nice if I could remove them from the filter form.
![No description](https://cdn.answeroverflow.com/1045025723355770930/Screenshot_from_2022-11-23_20-46-53.png)
Ahh sorry, my bad. I think this document can be helpful for you ⚡️
https://mui.com/x/react-data-grid/filtering/#customize-the-operators
Data Grid - Filtering - MUI X
Easily filter your rows based on one or several criteria.
foreign-sapphire•2y ago
Oh, so it's a Material UI thing. Thank you for the help. I really appreciate it.