Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Handle restored date filters when DataTable and DataView metadata changes after mount

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

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

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

2026年10月6日 から。

評価

この issue はまだ評価されていません。

説明

Summary

Handle restored date filters when field metadata gains filterType: 'date' after mount in both DataTable and DataView.

  • DataTable: columns can gain date-filter metadata after DataTableRoot initializes tableQuery.
  • DataView: root fields can change after mount, and a view's fields override can register after the initial query loads. These changes affect effectiveFields.

In both cases, an untyped restored date filter can remain untyped. Client filtering can then match no rows, and server query emission can use string-filter behavior instead of date-filter behavior.

This limitation predates PR #919. The follow-up is separate from that PR.

Required changes

  • Derive missing filter types from the current DataTable columns and DataView effectiveFields when computing row-filter state and emitted queries.
  • Use the shared date-filter metadata helper where appropriate.
  • Preserve existing filter values, operators, explicit types, and user edits.
  • Do not reinitialize tableQuery from the original query or add an effect that replaces user edits.
  • Ensure DataView uses the active view's effective metadata, including its fields override.

Affected areas

  • DataTable: DataTableRoot, row-filter state derivation, and server query emission. The reviewed root file is packages/react/components/data-table/data-table.tsx.
  • DataView: DataViewRoot, effectiveFields, row-filter state derivation, and server query emission.
  • Shared date-filter metadata helpers and DataTable/DataView regression tests.

Acceptance criteria

  • Mount DataTable with an untyped restored date filter, then give its column filterType: 'date'. Client filtering compares whole days and selects the expected rows.
  • Repeat this scenario in DataView for both updated root fields and a view's late-registering fields override.
  • In server mode, both components emit the restored filter with date semantics and a viewer-local YYYY-MM-DD stringValue after date metadata becomes available.
  • Preserve the original filter value and any user edits made before metadata arrives.
  • Leave explicitly typed filters and unrelated filters unchanged.
  • Add regression tests for both components, including client filtering and server query emission.

References

Requested by @Shreyag02.

主要言語
TypeScript
スター
69
フォーク
13
平均マージ
4日 4時間
マージ済み PR(30日)
27

環境構築

はじめの一歩

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

raystack/apsara のほかの issue

raystack/apsara の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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