Repository navigation
[fix]: stop virtualizing query combobox results - #8700
rijulpoudel wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
g1rly-c0d3r
left a comment
There was a problem hiding this comment.
Testing instructions
- Verify the list scrolls normally and does not jump back to the first result.
- Verify you can reach the bottom of the list.
- Scroll to the bottom and verify the next 50 results load and get appended without losing the current ones.
- Repeat the scroll test and verify nothing changed.
- Press ArrowDown a few times and verify the highlight moves and the list scrolls with it.
Looks good! I was able to scroll without issue on firefox.
kwhuber
left a comment
There was a problem hiding this comment.
- Verify the list scrolls normally and does not jump back to the first result.
- Verify you can reach the bottom of the list.
- Scroll to the bottom and verify the next 50 results load and get appended without losing the current ones.
- Repeat the scroll test and verify nothing changed.
- Press ArrowDown a few times and verify the highlight moves and the list scrolls with it.
Tested on CO and Taxon form.
JDAM2k4
left a comment
There was a problem hiding this comment.
Testing instructions
Firefox: scrolling in query combobox results
- Open a form that has a query combobox (for example Accession on a Collection Object, or Taxon on a Determination).
- Type
aso the list has many results. - Keep the pointer over the results and scroll down with the mouse wheel.
- Verify the list scrolls normally and does not jump back to the first result.
- Verify you can reach the bottom of the list.
Pagination
- Scroll to the bottom and verify the next 50 results load and get appended without losing the current ones.
Chromium
- Repeat the scroll test and verify nothing changed.
Keyboard
- Press ArrowDown a few times and verify the highlight moves and the list scrolls with it.
Tested on Geography from the Locality table. There's a brief delay when you start a new search where you can see the old results, but I don't think this is a problem.
On Edge, Firefox, and Chrome, all testing checks passed. However, I found that when you push the arrow keys to try to get to the bottom of the list, it will jump back to the beginning of the search results every time new results need to be loaded. You are able to scroll down, so I'm not sure if this is a bug that needs fixed.
Fixes #8691
What changed
Removed the virtualizer from
AutoComplete.tsxand render the query combobox rows directly.Headless UI keeps the active option as an index among the mounted options only. When the virtualizer unmounted rows while scrolling, that index pointed to a different row, so Headless UI called
scrollIntoViewon the wrong row and the list jumped back. Firefox shows it on every scroll step. Chromium hides it in normal wheel scrolling, but the same jump happens if the list is scrolled programmatically.Page size is 50 results per request, so mounting all rows is cheap (the old code rendered up to 1000). Pagination on scroll and the popup positioning fix from #8016 stay unchanged.
Before (also look at #8691 for video)
Program scrolling in dev tools:

After
Checklist
self-explanatory (or properly documented)
specify7/specifyweb/specify/management/commands/run_key_migration_functions.py
Line 50 in ea04665
Testing instructions
Firefox: scrolling in query combobox results
aso the list has many results.Pagination
Chromium
Keyboard
Summary by CodeRabbit