-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[data grid] Customizing showPreferences()
#11559
Comments
showPreferences()
showPreferences()
Hi @nalbion ... thanks for raising this. Please provide a minimal reproduction test case with the latest version. This would help a lot 👷. As right now I cannot see where and how you want to implement that Dialog. A live example would be perfect. This codesandbox.io template may be a good starting point. You can find more codesandbox templates in our docs. Thank you! 🙇🏼 |
Ok @nalbion ... now i understand. 🙇🏼 Here is a little demo of how you can customize the Let me know if you need more help on this topic! |
Thanks @michelengelen |
The problem in depth 🔍
When the user is selecting visible columns of a Data Grid, I want to provide a custom UI which groups the columns by group:
I've tried:
#1 -
useGridApiMethod
:This does not seem to modify the default "columns" preferences panel
#2 - Over-riding `gridApiRef.current.showPreferences()
This works once, but from then on you need to click in the table before it will work again.
#3 - subcribing to
GridEvents.preferencePanelOpen()
This seems like it should be the way to do it, but I can't figure out how to disable the default panel.
Your environment 🌎
`npx @mui/envinfo`
Search keywords: showPreferences
Order ID: c4bda37f65847b544e83c0a4d06babf1T1JERVI6MzkwMTMsRVhQSVJZPTE2Nzc5NzU2OTAwMDAsS0VZVkVSU0lPTj0x
The text was updated successfully, but these errors were encountered: