Closed NickAkhmetov closed 2 weeks ago
Following John's feedback, I've made some improvements to the fetchAllIds
functionality, using an async generator to sequentially request all the IDs for a given search request's results.
On login with HuBMAP Read, there are >20,000 kidney samples, so I was able to confirm the fix:
https://github.com/user-attachments/assets/3be82ec0-05f5-41b3-96fe-abc6c7234fc0
It is worth noting that adding the selected to a list caused the page to freeze. This might become a bigger issue if we start persisting lists in a key-value store.
Summary
The Kidney page on prod currently fails to select all results when using the "select all" checkbox of the samples table. This issue was caused by the
useAllSearchIds
hook being limited to only fetching the first 500 results. Lifting this limit/removing the "number of pages to fetch" from the ID lookup resolved this issue by enabling lookup of all 634 results in the table.Design Documentation/Original Tickets
https://hms-dbmi.atlassian.net/browse/CAT-634
Testing
Tested on the kidney page as well as other organ pages.
Screenshots/Video
https://github.com/user-attachments/assets/345dc850-6b0c-404e-8df7-a60bb7c0b031
Checklist
CHANGELOG-your-feature-name-here.md
is present in the root directory, describing the change(s) in full sentences.Additional Notes
I'm not sure if this PR overlaps with the changes in the searchkit PR - it can definitely wait if so.