Description
A user navigating the table with the keyboard (i.e., with the tab
key + enter
key) cannot trigger the sort functionality.
To Reproduce
You can see this behavior in the Storybook example.
https://react-bootstrap-table.github.io/react-bootstrap-table2/storybook/index.html?selectedKind=Sort%20Table&selectedStory=Enable%20Sort&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel
- Click on "Change Data" (to position the focus)
- Hit your
tab
key
- Hit your
enter
key
I expect the column to sort, but it does not do anything.
Hack/Workaround
I found a workaround for this issue with the following:
- Wrap the sortCaret icon in a
button
tag
- Disable the tabindex on the headers.
This workaround is not ideal, however.