callstack / callstack/react-native-pager-view
persist current page if we add item at the start of array
- 主要言語
- TypeScript
- スター
- 3.4k
- フォーク
- 476
- 平均マージ
- 10日 21時間
- マージ済み PR(30日)
- 2
説明
## Describe the feature
```
{posts.items.map(renderItem)}
```
for example, I have an array like this `posts=[4,5,6,7]` which I render in `PagerView` and go to the index 2 means `6`
then I add some items at the start of the array
```
[1,2,3].concat(posts)
```
when I set state I lost my current page which is logical `6`. I think there should be a prop for persisting current page if I add items at the start of an array
## Motivation
like TIKTOK app, when we swipe up and up then pagination api call and TikTok add more video at the start of an array
## Related Issues
N/A
コントリビューションガイド
調査の方向性
PagerView コンポーネントから開始し、initialPage、onPageSelected、レンダリングされた子要素への変更が選択されたページにどのような影響を与えるかを追跡します。配列の先頭に項目を追加して例を再現し、その後、配列の変更後も同じ論理項目が選択されたままであることを完了条件とします。この issue では特定のファイルやテストは指定されていません。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- react-native, typescript
- 領域
- mobile
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 28/100