Add option to show new creatable item as first or last option
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, react
- 領域
- frontend
調査の方向性
src/Creatable.js の 122 行目付近にあるオプション挿入箇所から始め、Creatable コンポーネントが props をどのように公開しているかを確認します。新しい creatable オプションを先頭または末尾に配置するために、要求された boolean の選択肢を追加し、それぞれの設定で期待されるオプションの順序になることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Hello,
I'm not sure what your general policy is for making changes to react-select-plus that are not already merged upstream into react-select but I thought I'd try anyway! 😎
Sometimes I'd like to discourage my users from creating a new option without at least looking through the list for similar options. In this case, I'd like the new "creatable" option to be last, rather than first.
I created a PR in react-select (JedWatson/react-select#1436) for this but I'm also using react-select-plus and it would be very useful for me to have it here.
The key change is adding a boolean prop to Creatable and use either unshift as it's currently doing or use push based on the prop here.
if (showNewOptionAtTop) {
filteredOptions.unshift(this._createPlaceholderOption);
} else {
filteredOptions.push(this._createPlaceholderOption);
}
Please let me know what you think. I'd be happy to fork and create a PR but I don't want to duplicate my changes here if you'd rather wait for them to merge it upstream.
Thanks!
- 主要言語
- JavaScript
- スター
- 284
- フォーク
- 90
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
HubSpot/react-select-plus のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
HubSpot/react-select-plus#128 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
HubSpot/react-select-plus#127 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
HubSpot/react-select-plus#126 · コメント 3 件 · リアクション 13 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
HubSpot/react-select-plus#124 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
HubSpot/react-select-plus#123 · コメント 4 件 · リアクション 3 件 ·
HubSpot/react-select-plus の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
521xueweihan/HelloGitHub#3939 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
aemsites/author-kit#19 ·
-
needs-website-changes
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信