Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Expose an API to cancel active scroll reconciliation

オープン
#1,285 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
62/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

@tanstack/virtual-core の実装で、reconcileScroll と scrollToIndex および scrollToOffset が使用する scrollState の周辺から始めてください。アクティブな調整ターゲットとその安全制限がどのように管理されているかを追跡し、その後、利用可能であれば既存の core テストを確認してください。公開された cancelScrollTo API が現在の DOM オフセットを変更せずにアクティブなターゲットを停止し、その後の測定による補正を維持できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Describe the use case

A virtualizer may have a long-distance scrollToIndex reconciliation in progress while the user begins a genuine wheel, touch, pointer, or keyboard scroll. The application must immediately hand viewport ownership back to the user.

In @tanstack/virtual-core 3.17.8, reconcileScroll can continue correcting toward the old target for up to the five-second safety limit. There is no public way to cancel it. The only effective application workaround is a private-field write:

;(virtualizer as unknown as { scrollState: unknown }).scrollState = null

That works, but is intentionally outside the public contract and can silently break on upgrade.

Requested API

A public method such as:

virtualizer.cancelScrollTo()

It should cancel the active scrollToIndex / scrollToOffset reconciliation target without changing the current DOM offset. This lets a user gesture take ownership immediately while preserving normal subsequent measurement compensation.

Why this belongs in core
  • Core owns the reconciliation state and its lifecycle.
  • Consumers cannot reliably infer or cancel every pending internal frame/timer.
  • User input cancellation is needed by chat timelines and other dynamic, long-distance virtual navigation surfaces.
Version

@tanstack/virtual-core 3.17.8; the same private-only state is present on current main.

主要言語
TypeScript
スター
7.1k
フォーク
466
平均マージ
2日 31分
マージ済み PR(30日)
13

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/virtual のほかの issue

TanStack/virtual の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。