Skip to content

Commit

Permalink
Reset filter input correctly in provider views (#3978)
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Aug 15, 2022
1 parent 17db1f6 commit 4b666a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -119,7 +119,7 @@ export default class ProviderView extends View {

this.username = res.username || this.username
this.#updateFilesAndFolders(res, files, folders)
this.plugin.setPluginState({ directories: updatedDirectories })
this.plugin.setPluginState({ directories: updatedDirectories, filterInput: '' })
},
this.handleError,
)
Expand Down Expand Up @@ -155,6 +155,7 @@ export default class ProviderView extends View {
files: [],
folders: [],
directories: [],
filterInput: '',
}
this.plugin.setPluginState(newState)
}
Expand Down Expand Up @@ -209,7 +210,7 @@ export default class ProviderView extends View {
loading: false,
files: ids,
}
this.plugin.setPluginState({ selectedFolders: folders })
this.plugin.setPluginState({ selectedFolders: folders, filterInput: '' })

let message

Expand Down
2 changes: 1 addition & 1 deletion packages/@uppy/provider-views/src/View.js
Expand Up @@ -44,7 +44,7 @@ export default class View {
}

clearSelection () {
this.plugin.setPluginState({ currentSelection: [] })
this.plugin.setPluginState({ currentSelection: [], filterInput: '' })
}

cancelPicking () {
Expand Down

0 comments on commit 4b666a6

Please sign in to comment.