[stable34] fix(settings): trigger group search on the correct NcSelect event (#7988) - #8244
Merged
Merged
Conversation
The "Signature request access" group selector listened for `@search-change`, which NcSelect (from @nextcloud/vue) / vue-select does not emit. Typing in the selector therefore never called `searchGroup`, so only the initial `onMounted` load (limit 20) ran and groups beyond the first 20 could not be found on larger instances. NcSelect exposes vue-select's native `search` event; switching the listener to `@search` makes typing query the backend as intended. The existing selection/save flow (`@update:modelValue`) is unchanged. Adds a regression test asserting that emitting the `search` event issues a `cloud/groups/details` request with the typed query. The test fails on the previous `@search-change` wiring (zero requests) and passes with the fix. Fixes #7988 Signed-off-by: Ethan Hawkes <ethanhawkes-gif@users.noreply.github.com>
Drive the loading state through NcSelect's own `search`-event callback instead of the reactive `loadingGroups`/`:disabled` binding. Toggling `:disabled` per keystroke disabled the focused text input and dropped focus on every character; routing the spinner through vue-select's `loading` callback keeps the input enabled throughout the search. `loadingGroups` now only guards the initial onMounted load. Adopts the simpler approach proposed by the issue reporter. Signed-off-by: Ethan Hawkes <ethanhawkes-gif@users.noreply.github.com> Co-authored-by: Spitfireap <45575529+Spitfireap@users.noreply.github.com>
refactor(settings): route exposed searchGroup through loadingGroups Extract the raw group fetch into a private `searchGroupApi` and let the exposed `searchGroup` wrap it, driving the reactive `loadingGroups`/`:disabled` binding so any parent component that calls the exposed function gets a visible loading state. `searchGroupEvent` (the NcSelect `@search` handler) keeps driving only vue-select's own `loading()` callback via `searchGroupApi`, so the text input stays enabled and never loses focus while typing (#7988). The initial onMounted load now relies on `searchGroup`'s own toggling. Adopts the structure proposed by the issue reporter. Signed-off-by: Ethan Hawkes <ethanhawkes-gif@users.noreply.github.com> Co-authored-by: Spitfireap <45575529+Spitfireap@users.noreply.github.com> [skip ci] Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
vitormattos
force-pushed
the
backport/7989/stable34
branch
from
September 4, 2026 13:26
fc0d479 to
0138313
Compare
vitormattos
marked this pull request as ready for review
September 4, 2026 13:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #7989
Warning, This backport's changes differ from the original and might be incomplete⚠️
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.