mui-datatables icon indicating copy to clipboard operation
mui-datatables copied to clipboard

Table tabIndex = -1

Open wenscl opened this issue 4 years ago • 2 comments

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

wenscl avatar May 17 '21 18:05 wenscl

yes I want this option as well

sathish-flipkoins avatar Oct 16 '21 13:10 sathish-flipkoins

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()} />

bmarsh432 avatar Aug 24 '22 14:08 bmarsh432