fix(GlFilteredSearch): Token activation after destruction
This makes more intuitive the behaviour of the active token after a token has been destroyed. The previous behaviour was to always activate the previous token, unless the token being deleted is the first one. This had two undesirable effects: 1. If you click the close `x` button on a token, the previous token's value would now become active. This likely isn't what you want, and is what #1679 is about. 2. If an active token is not the first token, and you click the close `x` on the first token, the currently active token changes, because all tokens got shifted down by one index. The new logic tries to maintain the active states of the tokens as-is, unless it's not possible, or the way the token was destroyed implies the previous token should be activated. That happens when a search term is destroyed by pressing backspace once it's empty. Addresses #1679.
Loading
-
mentioned in commit 9bb96a14
-
mentioned in merge request gitlab!82590 (closed)
-
mentioned in merge request gitlab-org/gitlab-services/design.gitlab.com!2746 (closed)
-
mentioned in merge request status-page!473 (merged)
-
mentioned in merge request gitlab-docs!2490 (merged)
-
mentioned in merge request gitlab!83216 (merged)
-
mentioned in merge request gitlab-org/gitlab-services/design.gitlab.com!2755 (merged)
Please register or sign in to comment