-
-
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
[DataGrid] Improve support for custom ColumnMenu #942
Comments
This comment has been minimized.
This comment has been minimized.
Ok, actually, no, it's not a duplicate of #926. There is still work (and breaking changes) that need to be done in order to allow developers to create custom column menus before it can be documented. Exposing a slot is far from enough when it comes to composability. What I could find, so far:
Things that I would challenge:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@hellpirat To clarify your use case, are you looking to completely replacing the content of the column menu or are you looking for adding new items inside it? |
I wanted completely replace the content with my buttons inside this Menu. |
@hellpirat Ok thanks. In this case, I think that we can close the issue with:
For extending the existing actions, it then becomes a matter of importing or not the existing components. |
I am upgrading to this new grid and I love it so far. However, our site needs to be multi-language according to the language the browser is in. The column menu is still showing in English. I need to be able to modify the text of the different menus in the list, so not necessarily doing a custom menu. I just need to be able to change the text displayed. For example,
Can this be done? I didn't notice anything in the documentation |
https://mui.com/components/data-grid/localization/#main-content You should be able to switch the language as described on this doc page 👍 |
@flaviendelangle @oliviertassinari What if I would like to add new items inside the menu? For example, I add an option called percentage that can covert a column from number to percent
Here is the sandbox link |
Here is a working example |
@flaviendelangle Hi ~ |
Not that I'm aware of, what makes you think that ? |
@flaviendelangle Because I have seen in many Demos that the relevant components are brought in from "@mui/x-data-grid-pro"
|
For the codesandbox above, you should be able to just replace the |
Any option to close the Menu after clicking on a custom action?! |
Hello, Is there anyway to use the custom ColumnMenu component?
Summary 💡
Examples 🌈
components={{ ColumnMenu: CustomColumnMenu }}
Motivation 🔦
I want to use CustomMenuComponent for deleting/editing column
The text was updated successfully, but these errors were encountered: