Implement local filtering in file list#26841
Conversation
So yeah, it doesn't work fully, but it is better than on 19. On 19 the search box is emptied and visible but the filter is still applied, giving you even more headache :P From my POV this is already a huge step forward and should be merged + backported. |
75d973e to
dad385f
Compare
|
Fixes #23432 |
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Joas Schilling <coding@schilljs.com>
|
I'll be leaving the follow up points for later as I agree with @nickvergessen that this is already a huge step forward and the old implementation had similar flaws when switching the file list:
|
|
Diff in case it might be useful to make sure that newly initialized filelists also have the filter, but there are some sideeffects when it comes to the loading indicator: import { subscribe } from '@nextcloud/event-bus'
+let searchQuery = ''
+subscribe('nextcloud:unified-search.search', ({ query }) => {
+ searchQuery = query ?? ''
+});
+
(function() {
const FilesPlugin = {
attach(fileList) {
+ // Initialize the file list with the current query in case there was a search before switching to the list
+ fileList.setFilter(searchQuery)
+
subscribe('nextcloud:unified-search.search', ({ query }) => {
fileList.setFilter(query)
})
|
Signed-off-by: Julius Härtl <jus@bitgrid.net>
dad385f to
9c937a6
Compare
|
/backport to stable22 |
|
/backport to stable21 |
|
/backport to stable20 |
|
👌 |
PVince81
left a comment
There was a problem hiding this comment.
Tested, works 👍
It's only strange that the dropdown also shows the same results after a while, but no biggie
|
The backport to stable22 failed. Please do this backport manually. |
|
The backport to stable21 failed. Please do this backport manually. |
|
The backport to stable20 failed. Please do this backport manually. |



Bring back local file list filtering which got removed with the implementation of unified search. It additionally introduces a bundled entrypoint for the files app which now unifies search handling, templates and the files app settings in the left navigation sidebar.