Skip to content

[Bug Report][3.11.6] Sortable headers can receive focus and update:sort-by events are emitted when disable-sort is truthy #22523

@brendan-nijboer-bw

Description

@brendan-nijboer-bw

Environment

Vuetify Version: 3.11.6
Vue Version: 3.5.25
OS: Linux undefined (current)

Steps to reproduce

  1. Click any header in the reproduction link -> watch text change below table
  2. Tab through focusable elements and notice headers receive focus

Expected Behavior

Headers with sortable enabled while the VDataTable itself has a disable-sort="true" prop can still receive keyboard focus when tabbed to.
In the same fashion, the update:sort-by event is also emitted when a header is clicked.

Actual Behavior

When disable-sort is truthy, headers should not be focusable and sort-by events should not be emitted.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

Suggested fix: conditional binds for tabindex, onClick and onKeydown attributes on header cells should also check for disableSort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: VDataTableT: bugFunctionality that does not work as intended/expected

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions