material-table-core / core

Datatable for React based on material-ui's table with additional features. Support us at https://opencollective.com/material-table-core
https://material-table-core.github.io
MIT License
295 stars 146 forks source link

Fix Table actions "disabled" prop not being checked when creating tooltip #850

Open ShotSkydiver opened 4 months ago

ShotSkydiver commented 4 months ago

Description

I noticed a small bug after the merging of the "removal of defaultProps" pr, specifically with the renaming of "disabled" in the MTableAction to "isDisabled": https://github.com/material-table-core/core/commit/28198974306263d5f8967a89471d3ef9b723d74d#diff-31854f487c033ec0756b72380ee05d26214810c393b33198e24d744249e2957bR35

The variable was renamed but the logic within if (action.tooltip) wasn't updated to check against that new variable name, so passing in true to the disabled prop on an action would no longer ever evaluate to true in that if statement, which meant the Tooltip content was never wrapped in a span when the action was disabled.

Impacted Areas in Application

* MTableAction

Additional Notes

This was just an oversight in the original pr, so it should be a very clearcut fix!

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

ShotSkydiver commented 1 month ago

This is a super simple thing to merge, hopefully someone does!