kirby
kirby copied to clipboard
Panel search: abort previous requests
This PR …
Fixes
- Panel search: previous search requests are aborted when new ones are sent to the backend https://github.com/getkirby/kirby/issues/6409
For review team
- [ ] Add changes & docs to release notes draft in Notion
There are now quite a few situations where the search is showing "No results" while there's still a search going on in the background that will eventually deliver results. It feels a bit confusing.
@bastianallgeier tricky one. I think we cannot work with the current boolean isLoading
then but rather need a counter incrementing when a request starts, decrementing when one is finished/aborted. What do you think?
Yep, makes sense. I also saw yesterday that we need to improve the "no results" part. It should only be shown if nothing is loading and maybe show a "Searching …" placeholder instead if there are no results in the list but loading is still happening.