Skip to content
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

Disabling DataTable does not work #701

Closed
jhickman opened this issue Aug 26, 2022 · 1 comment
Closed

Disabling DataTable does not work #701

jhickman opened this issue Aug 26, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@jhickman
Copy link

Disabling a DataTable only adds the "disabled" attribute and CSS class to the element, but doesn't actually disable interactions within the table.

Expected behavior
When disabling a DataTable, all interactions should be disabled, including column sorting, filtering, cell editing, checkbox selection model, etc. Disabling should also prevent tabbing into cells.

@jhickman
Copy link
Author

https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled

The disabled attribute is supported by <button>, <command>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea>, and <input>.

For a quick fix, I wrapped my datatable in a <fieldset> and disabled it instead. This prevented any child elements (other than form controls in a <legend>) receive focus. I also had to lay on top a 'before' psuedo element to prevent clicking and gray it out.

@vegegoku vegegoku added the enhancement New feature or request label Nov 18, 2022
@vegegoku vegegoku added this to the 1.0.0-RC15 milestone Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants