Skip to content

fix(tags): display selected tag in settings - #63508

Open
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-tags-settings-search-field
Open

fix(tags): display selected tag in settings#63508
joshtrichards wants to merge 2 commits into
masterfrom
jtr/fix-tags-settings-search-field

Conversation

@joshtrichards

@joshtrichards joshtrichards commented Aug 23, 2026

Copy link
Copy Markdown
Member
  • Resolves: #

Summary

The "Search for a tag to edit" field should display the selected tag, but it continues to show the placeholder after a tag is selected. It fails to do so because the object is passed instead of just the ID.

NcSelectTags uses ID-based model values by default (passthru is false). onSelectTag() expects the numeric ID and resolves it against props.tags.

This change passes the selected tag's ID instead, or null when no tag is selected:

  • the selector can resolve and display the selected option correctly;
  • the value passed to NcSelectTags matches the component's expected model format; and
  • the selector's model and onSelectTag() handler remain consistent.

TODO

  • ...

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Fixes #63503 

Signed-off-by: Josh <josh.t.richards@gmail.com>
The "Search for a tag to edit" field should show the selected tag as the selected option. It fails to do so because the object is passed instead of just the id.

Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 35 milestone Aug 23, 2026
@joshtrichards
joshtrichards requested a review from a team as a code owner August 23, 2026 14:55
@joshtrichards
joshtrichards requested review from kristian-zendato, skjnldsv and sorbaugh and removed request for a team August 23, 2026 14:55
@joshtrichards
joshtrichards changed the base branch from jtr/fix-tags-settings-limit to master August 23, 2026 14:55
@joshtrichards

Copy link
Copy Markdown
Member Author

/backport to stable34

:placeholder="t('systemtags', 'Collaborative tags …')"
:fetchTags="false"
:options="tags"
:limit="null"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That will cause type issues - either now or in the future at least.
Because limit is typed as number not number|null.
So either pass a real limit as number or do not pass limit meaning taking the default.

Otherwise if you need "all tags" then this needs a fix in the library allowing to pass null or 0

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@susnux susnux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

logic is fine - component documentation just wrong

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.

2 participants