feat(GlFormInput): Add debounce/lazy support
What does this MR do?
feat(GlFormInput): Add debounce/lazy support
The underlying BFormInput supports a debounce prop and a lazy
prop, allowing for debounced and lazy model updates respectively.
Because Vue's default model event is input, and BFormInput's model
event is update, we weren't able to make use of this before, since
the debounced/lazy effects of BFormInput were implemented via its
update event, not its input event.
Model binding on GlFormInput happened to work prior to this because
BFormInput also always synchronously emits input events for all
native input DOM events.
One way to fix this would be to make GlFormInput's model match the
underlying BFormInput's model, i.e., change model.event to
update, rather than the implicit default input. The problem with
this is that this is effectively a breaking change in our API.
Instead, we make GlFormInput's model.event explicitly input, and
map update events from the underlying BFormInput to input events
emitted by GlFormInput, and vice versa. This is not a breaking change.
Addresses #631 (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/uipackage can be upgraded quickly after the changes are released: -
Added the ~"component:*"label(s) if applicable.