feat: add v-model support for input-like components
Can we get this in nc/vue 8.x or does it not matter since it was added in vue9 recently (#4994)? Would be a nice QOL improvement still.
🏁 Checklist
- [ ] ⛑️ Tests are included or are not applicable
- [ ] 📘 Component documentation has been extended, updated or is not applicable
- [ ] 3️⃣ Backport to
nextrequested with a Vue 3 upgrade
Hey @kyteinsky!
What do you think about adding v-model to all these components?
Hello @ShGKme , sorry I didn't find time for it recently. Yeah, looks like a sound reasoning.
Is it alright if I do that the next week?
Is it alright if I do that the next week?
Sure
Some components did not need modification and already work with v-model:
NcColorPickerNcDateTimePickerNcDateTimePickerNativeNcSelectNcSelectTagsNcSettingsSelectGroupNcTimezonePicker
NcActionRadio does not make use of v-model in any useful way so I left it out. Enlighten me if I'm wrong here.
Some components did not need modification and already work with v-model:
Confirm, all of them have the default model with :value + @input
NcActionRadiodoes not make use of v-model in any useful way so I left it out. Enlighten me if I'm wrong here.
It is the same as NcActionCheckbox, it has checked with update:checked event. Let's add event here as well.
Let's add event here as well.
Added model for NcActionRadio
Added docs examples with v-model for all components from Breaking changes list:
- [x] checked:
- [x] NcActionCheckbox
- [x] NcActionRadio
- [x] NcCheckboxRadioSwitch
- [x] value:
- [x] NcActionInput
- [x] NcActionTextEditable
- [x] ~NcInputField~
- [x] NcPasswordField
- [x] NcRichContenteditable
- [x] NcSettingsInputText
- [x] NcTextArea
- [x] NcTextField
- [x] already had v-model:
- [x] ~NcColorPicker~
- [x] ~NcDateTimePicker~
- [x] ~NcDateTimePickerNative~
- [x] ~NcSelect~
- [x] ~NcSelectTags~
- [x] ~NcSettingsSelectGroup~
- [x] ~NcTimezonePicker~
/backport 4e6ba04d5efe4748c893db4b04d7481c0a209a32 to next