LearnNewsExamplesServices
Frontmatter
id19801
titleA sortable: false header still sorts on click
stateClosed
labels
bugaigrid
assigneesneo-opus-grace
createdAtOct 16, 2026, 1:19 PM
updatedAtOct 16, 2026, 1:57 PM
githubUrlhttps://github.com/neomjs/neo/issues/19801
authorneo-opus-grace
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtOct 16, 2026, 1:57 PM
milestonev13.3

A sortable: false header still sorts on click

neo-opus-grace
neo-opus-grace commented on Oct 16, 2026, 1:19 PM

Context

Found during the v13.3 manual sweep on dev af81fc0f86. examples/table/covid, apps/covid and apps/sharedcovid set sortable: false on their # column. One click on that header still shows a sort arrow and sorts the Store by index. In the covid table this runs into the collection defect #19800, so the table empties and no header sorts after that. Reproduced from a fresh load: Country sorts, then #, then Cases changes only its own arrow.

The Problem

grid.header.Button#onClick (src/grid/header/Button.mjs:407) and table.header.Button#onClick (src/table/header/Button.mjs:379) cycle isSorted without reading sortable. afterSetIsSorted then shows the arrow and fires sort, and the container sorts the Store. sortable itself only toggles neo-sort-hidden (afterSetSortable, grid :374, table :227), and the click's isSorted change undoes that.

The Architectural Reality

  • sortable reaches each button from the grid or table Container and from its header Toolbar (createItems and the runtime afterSetSortable hooks).
  • onClick also calls super.onClick(data), the Button handler, which has to keep running for a non-sortable header.
  • Design authority: afterSetSortable(false) hides the sort glyph, and three shipped tables set sortable: false on a column that must not sort.

The Fix

Both onClick methods cycle isSorted only while sortable is true. super.onClick(data) still runs.

Acceptance Criteria

  • Unit: a click on a sortable: false grid header and on a table header leaves isSorted null, the Store's sorters unchanged and the glyph hidden. A sortable header still cycles. Red on dev.
  • examples/table/covid: a click on # changes nothing, and the other headers keep sorting.
  • The existing grid and table header specs stay green.

Out of Scope

  • The collection emptying on a sort by index, #19800. This ticket only stops a non-sortable header from starting a sort.

Related

#19800 · #19795 (the same onClick, header filter clicks) · #19652

Live latest-open sweep: the latest 20 open issues at 2026-10-16T11:18Z, no equivalent. A search for sortable, false, header and click found nothing. A2A claim sweep: the latest 12 messages, through 11:17Z. The only grid claims are Emmy's #19794 and Ada's locked-arrow note, which #19798 covers. MC sweep: "header button sortable false still sorts on click table grid column not sortable", 5 results, no prior decision. Own-assignment sweep: 5 open (#19798, #19766, #19765, #19652, #15000), none overlapping.

Origin Session ID: bb2e8968-a6d6-4ef7-a4ed-5ab3157b1ac8 Retrieval Hint: "header button onClick ignores sortable false isSorted sort arrow covid index column"

tobiu referenced in commit ec71256 - "fix(grid): a sortable: false header never sorts on click (#19801) (#19803) on Oct 16, 2026, 1:57 PM
tobiu closed this issue on Oct 16, 2026, 1:57 PM