fix(webui): Remove stale DOM node caching which broke keypress-controlled scrolling.#1083
Conversation
WalkthroughThe update modifies the VirtualTable component to remove the cached scroll node reference, opting instead to query the scroll node element from the container on every keydown event. The logic for keyboard navigation and scrolling remains unchanged. Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
⚙️ Source: CodeRabbit Configuration File List of files the instruction was applied to:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
junhaoliao
left a comment
There was a problem hiding this comment.
i was able to reproduce the issue and can confirm the issue is fixed after applying the changes in this PR
for the title, how about:
fix(webui): Remove stale DOM node caching which broke keypress-controlled scrolling.
…lled scrolling. (y-scope#1083) Co-authored-by: Marco <david.marcovitch@yscope.com>
Description
PR #972 added scroll functionality to virtual table. As part of review, we added ability to cache table ref as performance optimization. Didnt notice then that ref can reference a previous table, and not always the latest table, which breaks the scrolling functionality since it is scrolling the ref from a previous table.
This PR removes the ref.
Checklist
breaking change.
Validation performed
Run a query, then tried to scroll, and scroll worked as expected. Previously, occasionally did not scroll.
Summary by CodeRabbit