Using scrollTo method of the dropdown list (menu) in the OptionList component
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンクされている CodeSandbox の再現例から始め、OptionList が RenderDropdownMenu を通じてどのようにレンダリングされるかを追跡します。オプションを選択してドロップダウンを再度開いた後、またはドロップダウンをスクロールした後のスクロール位置を確認します。報告されている、選択した項目へ意図せず戻る問題が、意図された初期スクロール動作を失うことなく解消されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi, I have the following problem with OptionList. I am using the AutoComplete component in the antd library.
The dropdown list uses the optionList from rc-select. I need to scroll to the selected item in the input field when opening the dropdown list.
To do this, I use the useEffect hook when rendering the menu (RenderDropdownMenu), where I access the menu and call scrollTo to the desired index. But the hook is triggered every time the menu is rendered and returns to the selected item.
What can be done about it?
Reproduction:
https://codesandbox.io/p/sandbox/selectscrollto-29x7sc?file=%2Fdemo.tsx%3A130%2C20
- Select "value" in the dropdown
- Try scroll down or up
antd developers couldn't help
thanks
- 主要言語
- TypeScript
- スター
- 938
- フォーク
- 482
- 平均マージ
- 15時間 8分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/select のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
react-component/select#1216 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
react-component/select#1159 ·
-
a11y 问题オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/select#1087 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
react-component/select#1086 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
react-component/select#1082 · コメント 1 件 ·
react-component/select の issue をすべて見る
似ている issue
-
check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Fission-AI/OpenSpec#1986 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
nestjs/docs.nestjs.com#3554 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
publicodes/publicodes#868 ·
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
EclipseFdn/open-vsx.org#13488 ·
メンテナーはふだん 2 日以内に返信