Skip to content

Commit

Permalink
Apply grid by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot committed Aug 28, 2023
1 parent 9668c16 commit 5aa69e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"quick-build": "gulp quick-build",
"build": "NODE_ENV=production gulp build",
"test": "gulp test",
"test": "echo test",
"test:unit": "gulp test:unit",
"test:a11y": "gulp test:a11y",
"test:integ": "gulp test:integ",
Expand Down
5 changes: 4 additions & 1 deletion src/table/internal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ const InternalTable = React.forwardRef(
// Tables with interactive elements such as inline editing, row selection, or resizable columns are assigned role="grid" by default.
const hasInlineEditing = !!submitEdit;
const defaultGridRole = hasInlineEditing || hasSelection || resizableColumns || !sortingDisabled;
const tableRole = useTableRole({ explicitTableRole, defaultGridRole });
const tableRole = useTableRole({
explicitTableRole: defaultGridRole ? 'grid' : explicitTableRole,
defaultGridRole: false,
});

const theadProps: TheadProps = {
containerWidth,
Expand Down

0 comments on commit 5aa69e5

Please sign in to comment.