Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset filter input correctly in provider views #3978

Merged
merged 1 commit into from Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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