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

fix(files): File type filter UI sync with filter state #49259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

susnux
Copy link
Contributor

@susnux susnux commented Nov 13, 2024

Summary

When changing the folder the filter will be re-mounted by the file list, so we need to pass the current state of the filter to the filter UI.

Checklist

@susnux susnux added this to the Nextcloud 31 milestone Nov 13, 2024
@susnux susnux requested review from a team and removed request for a team November 13, 2024 16:02
@susnux susnux requested a review from skjnldsv as a code owner November 13, 2024 16:02
@susnux susnux self-assigned this Nov 13, 2024
@susnux
Copy link
Contributor Author

susnux commented Nov 13, 2024

/backport to stable30

@susnux
Copy link
Contributor Author

susnux commented Nov 13, 2024

/compile

When changing the folder the filter will be re-mounted by the file list,
so we need to pass the current state of the filter to the filter UI.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux susnux force-pushed the fix/file-type-filter-state branch from 67ed7d5 to 7be3fd3 Compare November 17, 2024 00:42
@susnux susnux requested a review from Pytal November 17, 2024 00:42
@@ -71,6 +75,10 @@ export default defineComponent({
},

watch: {
/** Reset selected options if property is changed */
preset() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
preset() {
presets() {

Looks like the prop was renamed to presets

@@ -142,7 +144,8 @@ class TypeFilter extends FileListFilter {
}

public setPreset(presets?: ITypePreset[]) {
this.currentPresets = presets
this.currentPresets = presets ?? []
this.currentInstance!.$props.preset = presets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.currentInstance!.$props.preset = presets
this.currentInstance!.$props.presets = presets

Same as above

@blizzz blizzz mentioned this pull request Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filter does not survive the change to a subdirectory
2 participants