nextcloud-vue icon indicating copy to clipboard operation
nextcloud-vue copied to clipboard

feat: add v-model support for input-like components

Open kyteinsky opened this issue 1 year ago • 6 comments

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 next requested with a Vue 3 upgrade

kyteinsky avatar Mar 17 '24 21:03 kyteinsky

Hey @kyteinsky!

What do you think about adding v-model to all these components?

ShGKme avatar Apr 09 '24 15:04 ShGKme

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?

kyteinsky avatar Apr 10 '24 12:04 kyteinsky

Is it alright if I do that the next week?

Sure

ShGKme avatar Apr 10 '24 13:04 ShGKme

Some components did not need modification and already work with v-model:

  1. NcColorPicker
  2. NcDateTimePicker
  3. NcDateTimePickerNative
  4. NcSelect
  5. NcSelectTags
  6. NcSettingsSelectGroup
  7. NcTimezonePicker

NcActionRadio does not make use of v-model in any useful way so I left it out. Enlighten me if I'm wrong here.

kyteinsky avatar May 22 '24 01:05 kyteinsky

Some components did not need modification and already work with v-model:

Confirm, all of them have the default model with :value + @input

NcActionRadio does 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.

ShGKme avatar Oct 09 '24 08:10 ShGKme

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~

Antreesy avatar Oct 22 '24 12:10 Antreesy

/backport 4e6ba04d5efe4748c893db4b04d7481c0a209a32 to next

Antreesy avatar Oct 29 '24 08:10 Antreesy