Skip to content

[stable35] fix(settings): Import the settings components directly - #1610

Draft
danxuliu wants to merge 2 commits into
stable35from
backport/1562/stable35-fix/settings-switch-model-binding
Draft

danxuliu wants to merge 2 commits into
stable35from
backport/1562/stable35-fix/settings-switch-model-binding

Conversation

@danxuliu

Copy link
Copy Markdown
Member

Backport of #1562

…el binding

Importing from the "@nextcloud/vue" barrel pulls the whole component library
into the admin entry point, which made "files_pdfviewer-admin.js" 3.8 MiB for
a single checkbox. Importing the three components directly keeps only what is
used.

The switch also bound both "v-model" and "@update:checked". "update:checked"
is deprecated in @nextcloud/vue 8 and gone in 9, and "v-model" flipped the
switch before the request had been answered, so a failed save left the switch
showing a value the server never stored. Binding "model-value" one way and
updating it only once the request succeeded keeps the two in sync.

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
@danxuliu

Copy link
Copy Markdown
Member Author

/compile

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
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.

3 participants