domino-ui
domino-ui copied to clipboard
Disabling DataTable does not work
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.
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.