callstack / callstack/react-native-pager-view
With dynamic input, pager view assumes the new added element is at the end and not at the beginning.
- 主要言語
- TypeScript
- スター
- 3.4k
- フォーク
- 476
- 平均マージ
- 10日 21時間
- マージ済み PR(30日)
- 2
説明
if we pass an array and we update the array adding a new element at the beginning of the array, native pager assumes that the element is added at the end. There should be an option to edit this.
This causes various bugs:
- setPage doesn't work. Calling setPage(0) actually scrolls to the second element given that a new one was added but it's not take into account.
- the scroll dots go out of sync.
The code is simply the standard example of PagerView but passing an array with an extra element at the beginning dynamically.
コントリビューションガイド
調査の方向性
Issue に記載されている標準的な PagerView の例から始め、配列の先頭に要素が追加されるケースを再現します。動的な子要素、setPage(0)、およびスクロールドットがその変更にどのように反応するかを追跡します。要素を先頭に追加しても、選択されたページとドットの同期が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native, typescript
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100