mui-datatables
mui-datatables copied to clipboard
Table tabIndex = -1
I want to set the table's tabIndex prop to -1. Can you add it as a table option? https://github.com/gregnb/mui-datatables/blob/7558e7393b6ee4b21c9481613429efcdbe7a6ddc/src/MUIDataTable.js#L1995
yes I want this option as well
This came up as an accessibility issue for focus order (https://www.w3.org/WAI/WCAG21/Understanding/focus-order)
For anyone wanting a solution you can set the tableProps via tableOptions:
const getTableOptions = () => {
...
setTableProps: () => ({
tabIndex: "-1"
})
}
<MUIDataTable title="" data={data} columns={columns} options={getTableOptions()} />