overscanRowCount - Number of rows to render above/below the visible bounds of the list. This can help reduce flickering during scrolling on certain browsers/devices.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
例に示されている VirtualList のエントリポイントから始め、表示される行と動的なアイテムの高さがどのように処理されているかを調べてください。Issue にはファイルもテストも指定されていません。完了条件は、overscanRowCount オプションを公開し、コンテンツに依存して高さが決まるチャットメッセージのちらつきを減らすことです。
索引モデルが issue の本文から書いたものです。
説明
I have a list of chat messages. The message height depends on the content.
My code is below. And everything seems to work well, but there is one moment, I can’t find the "overscanRowCount" property. Number of rows to render above/below the visible bounds of the list. This can help reduce flickering during scrolling on certain browsers/devices.
Can you do something about the flicker?
const Message = ({ i }: any, ref: any) => {
return (
<div
ref={ref}
style={{
border: "1px solid gray",
}}
>
<Avatar />
message {i}
// Dynamic height by content
{i % 2 ? <div style={{ height: 100 }} /> : null}
</div>
);
};
const ForwardMessage = React.forwardRef(Message);
const Chat = () => {
const listRef = React.useRef<any>(null);
const size = useSize();
// Infinite scroll
const onScroll = (e: any) => {
if (e.target.scrollHeight - e.target.scrollTop === size?.height) {
appendData();
}
};
<VirtualList
ref={listRef}
data={data}
height={size?.height}
itemHeight={30}
itemKey="email"
onScroll={onScroll}
>
{(item: any, i: any) => <ForwardMessage i={i} {...item} />}
</VirtualList>
}
- 主要言語
- TypeScript
- スター
- 815
- フォーク
- 175
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/virtual-list のほかの issue
-
[Bug] Virtual scrollbar overlaps the content instead of reserving a gutter対応中かも @dannyward630 が 38 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
react-component/virtual-list#391 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
react-component/virtual-list#325 · コメント 1 件 ·
-
渲染第一项高度变更,滚动位置不准确オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
react-component/virtual-list#303 ·
-
希望添加横向虚拟滚动オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
react-component/virtual-list#297 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
react-component/virtual-list#292 ·
react-component/virtual-list の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Inbox: permission prompt (perm:) sessions appear as duplicate agents in the recipient picker and participants対応中かも @Djiit が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
backnotprop/plannotator#4517 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#6000 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
OpenSlides/openslides-client#6768 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
modelcontextprotocol/modelcontextprotocol#3622 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信