fix(GlSearchBoxByType): Fix double input event
What does this MR do?
fix(GlSearchBoxByType): Fix double input event
Prior to this change, GlSearchBoxByType
maintained its own local copy
of the model value, which had a setter that emitted an input
event
when it changed. In addition, it forwarded all listeners to the
underlying GlFormInput
, which emits its own input
event as well.
These two facts together meant that when a consumer explicitly added
a listener (either via @input
or v-model
), it would be called
twice: once by the computed setter's input
event, and again by the
GlFormInput
's input
event.
This change removes the unnecessary local copy of the model, and
explicitly forwards the input
event from the underlying GlFormInput
.
Addresses #937 (closed).
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.
Addresses #937 (closed)
Edited by Mark Florian