Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
During QA of the new searching and sorting features (which are great!) we found a weird edge-case that can arise when using both together.
From Entity Share:
- search sharable content for 'test' (notice that only content with 'test' in the title appear
- clear the search input and press Return (notice that all options show again)
- search sharable content again for 'test'
- click the table header LABEL to sort by label (notice that the URL changes to show both the search and the sort queries)
- clear the search input and press Return - notice that you still only see content with 'test' in the title and the URL still shows the search query for 'test'
Attached is a video demonstrating this behavior.
Comment | File | Size | Author |
---|---|---|---|
#3 | entity_share-ajax_search-3088871-3.patch | 1.29 KB | Grimreaper |
search-and-sort.mov | 8.06 MB | quicksketch |
Comments
Comment #2
GrimreaperComment #3
GrimreaperThanks @quicksketch for the testing.
I found where the problem was, here is a patch to fix it.
But as it is still in an Ajax refresh of the form, the searched test will still be in the URL but not taken into account.
Waiting your feedbacks before merging.
Thanks for the review.
Comment #4
quicksketchThis works!
> But as it is still in an Ajax refresh of the form, the searched test will still be in the URL but not taken into account.
Yeah, it would be nice if core provided an AJAX command to update the browser history so we could do the same thing as table sorts do.
Comment #6
GrimreaperThanks for the feedback!
This is merged now.