material-table: Actions `disabled` prop is not respect in 1.54.0 and 1.54.1
Describe the bug
The disabled
prop is not respected on the Action
object.
To Reproduce Steps to reproduce the behavior:
- Go to any of the examples for actions
- Edit the action to have
disabled: true
prop - See that the action is not disabled
Expected behavior
disabled
prop is respected.
Screenshots n/a
Desktop (please complete the following information): n/a
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 13
- Comments: 17
Could anybody merge this PR?
Having the same issue with 1.54.1. I’m using the sample version from the documentation on Conditional Actions, which also doesn’t seem to be working Conditional Actions Example
CodeSandbox Example
Behavior is the same that @IraSkyx describes. It doesn’t work when passing a function and when passing ‘disable’ prop in an object it works but affects every row
I have the same bug when I use a function to actions.
https://codesandbox.io/s/react-example-zumc6?fontsize=14&hidenavigation=1&theme=dark
Any update on this issue?
downgrading to v1.53.0 solved the issue for me.
I also have the same issue in 1.54.1
Hello!
After update from version 1.50.0 to 1.54.1 it doesn’t work.
I can reproduce this.
CodeSandbox : https://codesandbox.io/s/material-table-issue-with-disabled-4iioi
It seems to occur only when passing a function as action
rowData => ({ icon: React.forwardRef((props, ref) => ( <Check {...props} ref={ref} /> )), disabled: true })
Doesn’t work in 1.54.1
While :
{ icon: React.forwardRef((props, ref) => ( <Check {...props} ref={ref} /> )), disabled: true }
Does work even in 1.54.1