Southpaw
(Southpaw)
March 11, 2019, 2:29am
1
When I try to take bulk actions on search results, the checkboxes vanish every time I hit the bottom of the page and new topics are loaded.
Steps to reproduce:
Perform a search that will return more than 50 results.
Click the button to select individual topics.
Scroll down to the bottom of the search results so that additional topics load.
Observe that the checkboxes vanish, requiring you to start the selection task anew.
By contrast, when taking bulk action on a topic list in a Category, the checkboxes are preserved as new content is loaded at the bottom of the page.
3 Likes
Stephen
(Stephen)
March 11, 2019, 5:56am
3
venarius
(Tim Lange)
March 11, 2019, 7:31am
4
Has probably something to do with the loadMore()
function in the full-page-search.js.es6
controller calling _search()
, in which there is this.set("bulkSelectEnabled", false);
It should probably keep its state when page is greater than 1.
Would love to do a PR!
Edit: PR is open
https://github.com/discourse/discourse/pull/7139
6 Likes
This is kind of an unusual scenario. You need to take action on more than 50 search results at once?
Southpaw
(Southpaw)
March 11, 2019, 12:16pm
6
Yes. I wouldn’t have stumbled upon the issue had I not needed to take action on a large number of search results.
I don’t need to do it frequently, but when I do need it, it would be nice if it worked the same way as the bulk actions in the Category list.
2 Likes
sam
(Sam Saffron)
March 12, 2019, 1:54am
7
Cool, thanks for the fix @venarius I just deployed it to your site @Southpaw and it should be live in 20 mins.
Its not 100% perfect but we no longer losing state which was the big bug here.
6 Likes
Southpaw
(Southpaw)
March 12, 2019, 2:40am
8
Thanks for the quick action to get this solved!
sam:
Its not 100% perfect
I’m not sure what 100% perfect would look like, but this fix is good!
2 Likes
sam
(Sam Saffron)
March 12, 2019, 3:26am
9
I was being a bit vague… we don’t plan to gold plate this, however… if we were to gold plate it…
User clicks “select all”
We detect not everything is loaded, we display something like this (in a modal)
I think its totally fair for me to explain this thing, but yeah we will not be taking pull requests on this rare functionality quite yet.
5 Likes
sam
(Sam Saffron)
Closed
March 13, 2019, 7:00am
10
This topic was automatically closed after 29 hours. New replies are no longer allowed.