Sort list pages by clicking a column header

オープン
#165 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@fetrarij がすでに取り組んでいます。

2026年11月13日 から。

  • #208 @fetrarij による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
angular, supabase, tailwindcss, typescript

調査の方向性

Read libs/demo-shared/src/lib/resource-list-state.ts and the resource table implementations under libs/material/src/lib/resource-table/ and libs/tailwind/src/lib/resource-table/; check how ListParams.sorters reaches the Supabase data provider. Then trace both demos and the generated pages with pnpm run sync:pages. Done means both table layers support the three-step sort cycle, reset to page 1, expose aria-sort and keyboard interaction, and have tests for sorting and pagination reset.

索引モデルが issue の本文から書いたものです。

説明

accessibility enhancement layer: library pkg: material pkg: tailwind

What is wrong

List pages cannot be sorted by clicking a column header. The order is fixed by defaultSorters or falls back to id.

Where to look

  • The data layer already supports sorting: sorters in ListParams (libs/core/src/lib/list-params.ts), applied by the Supabase data provider.
  • The list state builds its sorters in libs/demo-shared/src/lib/resource-list-state.ts (definition()?.defaultSorters ?? [{ field: 'id', order: 'asc' }]).
  • Tables: libs/material/src/lib/resource-table/ (Angular Material has MatSort) and libs/tailwind/src/lib/resource-table/.

Proposal

  • A click on a header sorts by that column: ascending, then descending, then back to the default order.
  • The table shows which column is sorted and in which direction (aria-sort on the header).
  • The page goes back to page 1 when the sort changes.
  • A field can opt out of sorting (for example a long text).

Done when

  • Sorting works in both UI layers, in both demos and in the generated pages (pnpm run sync:pages).
  • aria-sort and keyboard use work.
  • Tests cover the sort cycle and the reset to page 1.
主要言語
TypeScript
スター
2
フォーク
2
平均マージ
9時間 17分
マージ済み PR(30日)
48

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pidrang/pidrang のほかの issue

pidrang/pidrang の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。