You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is most apparent if you use a later verison of Material UI (I know the lib currently only supports v3, but having the incorrect class may have other side effects). If you use MUI v4 and you hover over a checkbox, you see the secondary color, but when you click the checkbox, you see the primary color:
This mismatch is due to how the library is setting the color for the checkbox. If you inspect the element, you find that "MuiCheckbox-colorSecondary" is being applied. The secondary color is the default if no color is provided to the Checkbox component:
This issue is most apparent if you use a later verison of Material UI (I know the lib currently only supports v3, but having the incorrect class may have other side effects). If you use MUI v4 and you hover over a checkbox, you see the secondary color, but when you click the checkbox, you see the primary color:
https://codesandbox.io/s/muidatatables-custom-toolbar-yv860
This mismatch is due to how the library is setting the color for the checkbox. If you inspect the element, you find that "MuiCheckbox-colorSecondary" is being applied. The secondary color is the default if no color is provided to the Checkbox component:
https://v3.material-ui.com/api/checkbox/
The library sets the color using a class override:
https://github.com/gregnb/mui-datatables/blob/master/src/components/TableSelectCell.js#L37
This issue can be fixed if the color is instead set via the Checkbox's "color" attribute.
Expected Behavior
MuiCheckbox-colorPrimary-* class applied to selectable row checkboxes.
Current Behavior
MuiCheckbox-colorSecondary class applied to selectable row checkboxes.
Steps to Reproduce (for bugs)
Your Environment
ClassName mismatch happens regardless of environment.
The text was updated successfully, but these errors were encountered: