fix(GlTokenSelector): wait for prop changes before closing dropdown
What does this MR do?
Wraps the check responsible for opening/closing the dropdown in $nextTick
.
If you use the text-input
event to validate the input and then change the hideDropdownWithNoItems
prop it will not have updated when the check responsible for opening/closing the dropdown runs.
Below is a real-world example:
Before
Screen_Recording_2020-07-27_at_1.59.41_PM
Notice the dropdown doesn't disappear until you hit the backspace button twice
After
Screen_Recording_2020-07-27_at_1.54.23_PM
Does this MR meet the acceptance criteria?
Conformity
-
Code review guidelines. -
GitLab UI's contributing guidlines. - [-] If it changes a Pajamas-compliant component's look & feel, the MR has been reviewed by a UX designer.
- [-] If it changes GitLab UI's documentation guidelines, the MR has been reviewed by a Technical Writer.
- [-] If the MR changes a component's API, integration MR(s) have been opened in the following projects to ensure that the
@gitlab/ui
package can be upgraded quickly after the changes are released:- [-] GitLab: mr_url
- [-] Customers Portal: mr_url
- [-] Status Page: mr_url
-
Added the ~"component:*"
label(s) if applicable.
Edited by Peter Hegman