Material-table: Actions `disabled` prop is not respect in 1.54.0 and 1.54.1

Created on 12 Nov 2019  路  17Comments  路  Source: mbrn/material-table

Describe the bug
The disabled prop is not respected on the Action object.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any of the examples for actions
  2. Edit the action to have disabled: true prop
  3. See that the action is not disabled

Expected behavior
disabled prop is respected.

Screenshots
n/a

Desktop (please complete the following information):
n/a

Most helpful comment

Could anybody merge this PR?

All 17 comments

I am not able to reproduce this bug, neither in my local environment, nor in the examples for actions. Adding disabled: true, does seem to disable the buttons (I am no longer able to click on them).

Can you share an example where you see this occurring?

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

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

Hello!

After update from version 1.50.0 to 1.54.1 it doesn't work.

I also have the same issue in 1.54.1

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

Could anybody merge this PR?

I join @dmytro-mavrosaus request

Hi,
Same issue with 1.54.1 and 1.54.2. I would appreciate if @dmytro-mavrosaus ' PR is merged.

What's strange is that the hidden prop works just fine when using a function for an Action object.

Same issue v1.54.2.

Do we have any news regarding a 1.54.3 containing this fix ?

Ran into the same issue... with latest v1.54.2

downgrading to v1.53.0 solved the issue for me.

dont know why are we still waiting for this PR to be merged. :(

Any update on this issue?

It seems this issue is fixed as of 1.57.2. Everyone affected upgrade to this version. I will close this issue. 馃帀

Was this page helpful?
0 / 5 - 0 ratings