-
-
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] Make value and colDef accessible in actions column #15667
Comments
Hey @aress31 ... why would you need a value or valueGetter in getActions? The actions col is a special column which purpose is simply to render a series of buttons that perform actions on the row in question. That's exactly why we pass the row as a property to it. Could you explain your specific use case please? |
@michelengelen simply because my action column need contextual information such as the current value/column name to process the action logic. See the code snippet in my opening message. |
I got that ... but how do you determine "current column"? Is it the selected one? Is it all of them? Without knowing this its hard to tell what you are trying to achieve. You can always use the selectionModel to get the currently selected cell/row to process that. 🤷🏼 |
@michelengelen I would just expect the |
But the actions column does not have any value that could be transformed by a If you really need the value form another column within the getActions you can use the |
Summary
The params in
getActions
are onlyrow
,id
and andcolumns
; there is no information about the currently processed column or value which is quite restrictive when using type mappings. Addin them would improve DX and remove boilerplate code.Examples
Note: Also, transformations within
valueGetter
don't seem accessible togetActions
too.Motivation
Improve the DX and provide contextual info to
getActions
.Search keywords: actions
The text was updated successfully, but these errors were encountered: