Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Jul 17, 2025

Backport of #53964

The unified search modal was intended to be cleared when closed.
However, "UnifiedSearchModal" did not emit "update:query" when its
internal query value ("searchQuery") changed, so "UnifiedSearch.query"
was kept as an empty string. When the modal was closed "update:query"
was emitted with an empty string, which should have cleared
"UnifiedSearch.query" and that, in turn, should have cleared the modal.
However as "UnifiedSearch.query" was already an empty string the watcher
that updates "UnifiedSearchModal.searchQuery" from "UnifiedSearch.query"
was not triggered and the modal was not cleared.

As "UnifiedSearch.query" is now updated with the value of
"UnifiedSearchModal.searchQuery" the latter can not be trimmed when
updated from the former, as that would in turn also trim
"UnifiedSearchModal.searchQuery" and prevent to search for anything with
spaces at the beginning or end (even if those trailing spaces are just
temporary while writing something like "searched value").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@backportbot backportbot bot requested review from danxuliu, skjnldsv and szaimen July 17, 2025 11:41
@backportbot backportbot bot added this to the Nextcloud 31.0.8 milestone Jul 17, 2025
@danxuliu
Copy link
Member

/compile amend

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command nextcloud-command force-pushed the backport/53964/stable31 branch from 6ad8614 to 4e13319 Compare July 17, 2025 11:46
@danxuliu danxuliu marked this pull request as ready for review July 17, 2025 12:39
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@danxuliu danxuliu enabled auto-merge July 17, 2025 12:41
Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

@danxuliu danxuliu merged commit 15f71b5 into stable31 Jul 17, 2025
133 of 135 checks passed
@danxuliu danxuliu deleted the backport/53964/stable31 branch July 17, 2025 12:51
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 5, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants