Define model config on components intended to work with v-model
With !1262 (merged), our Storybook for GitLab UI automatically documents the prop and event used for model binding when components explicitly set their model configuration.
While many components use the implicit defaults ({ prop: 'value', event: 'input' }), by defining them explicitly, they are better documented.
Components which are thin wrappers around third-party components need to be especially deliberate about defining this, since the wrapped component doesn't always use the model defaults. This has caused our components to be broken in subtle and not-so-subtle ways.
We have various components which are expected to be used with v-model, but don't explicitly define the model (this is a non-exhaustive list):
- GlDatepicker
- GlDaterangePicker
- GlFilteredSearch
- GlFormInput
- (being addressed in !1628 (merged))
- GlFormSelect
- GlFormTextArea
- GlSearchByClick
- GlSearchByType
- (being addressed in !1628 (merged))
Edited by Mark Florian