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

DataView filters: support icons on select options (and use field.icon)

オープン 初心者向け
#942 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript
領域
frontend

調査の方向性

Issue に書かれている型 FilterSelectOption とコンポーネント FilterChip、そして SelectItemProps と leadingIcon を示す Select.Item の実装から始める。フィルターオプションがどこで spread されるか、また "Add filter" メニュー項目がどこで構築されるかを追い、なぜ DataViewField.icon が一度も読まれないのかを確認する。完了条件は、オプションが leadingIcon/disabled を持つこと、単一値のチップがそのアイコンを表示すること、field.icon がメニューとチップに現れること、そして既存の DataView/FilterChip のコンポーネントテストが引き続き通ること。

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

説明

Select filters in DataView can only show plain text options right now. A lot of filters can have an icon that goes with each value, like a status dot, a priority glyph, or an avatar. Without it, the filter dropdown looks different from the column it's filtering, and it's slower to scan.

Select.Item already supports leadingIcon. But FilterSelectOption is just { value, label }, and FilterChip only passes label through, so there's no way to get an icon in.

Also, DataViewField has an icon prop, but as far as I can tell nothing reads it. It doesn't show in the "Add filter" menu or on the chip.

What I'd suggest

  1. Let filter options take the same extras Select.Item does, instead of adding fields one by one:

    type FilterSelectOption = {
      value: FilterValueType;
      label: string;
    } & Pick<SelectItemProps, 'leadingIcon' | 'disabled'>;
    

    FilterChip would spread those onto Select.Item. label stays a plain string, since search, accessibility and the "N selected" text all depend on it.

  2. When one value is picked, show its icon in the chip as well, not just in the dropdown. Multiple values can keep showing "N selected".

  3. Use field.icon for the "Add filter" menu item and the chip's leadingIcon.

I'd skip a render-prop like renderOption. It would break the text-based stuff above, and every app would end up drawing options differently. If two-line options are ever needed (name + email), a description field would cover that better.

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

環境構築

はじめの一歩

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

raystack/apsara のほかの issue

raystack/apsara の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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