diff options
author | Marco <marcoambrosini@icloud.com> | 2023-01-23 12:12:51 +0000 |
---|---|---|
committer | Marco <marcoambrosini@icloud.com> | 2023-01-24 15:10:55 +0000 |
commit | 4030e9660c54091c2fefbf07a0ab3bfef7a466f1 (patch) | |
tree | 3b1a018bb0e7d44f54750aa07af8b8df7d4e1e9c | |
parent | 109d0e3f8336ba4636dcdf9238f494ccb7fc8fc6 (diff) |
Remove comments
-rw-r--r-- | src/components/BreakoutRoomsEditor/SelectableParticipant.vue | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/components/BreakoutRoomsEditor/SelectableParticipant.vue b/src/components/BreakoutRoomsEditor/SelectableParticipant.vue index 21f7eb5ea..9b1c8f644 100644 --- a/src/components/BreakoutRoomsEditor/SelectableParticipant.vue +++ b/src/components/BreakoutRoomsEditor/SelectableParticipant.vue @@ -22,20 +22,6 @@ <template> <div tabindex="0" class="participants-editor__participant"> - <!-- - Previously it was $emit('', event.target.value), where - event.target.value - is just a string from value attr - So "update" event changes Array value with String value - - Native checkbox works only with boolean: checked / not checked. - Array for checkbox - is a feature of checkbox's v-model in Vue - Solution - use v-model. - Bad way: v-model="checked", but it is direct prop mutation. - Better solution: proxy v-model with computed with custom setter - --> - <!-- --> - <!-- --> - <!-- --> <input id="participant.attendeeId" v-model="modelProxy" :value="participant.attendeeId" @@ -80,18 +66,14 @@ export default { }, }, - // Best practice + migration to Vue 3 emits: ['update:checked'], computed: { modelProxy: { get() { - // Value for v-model is just "checked" - // The same as v-model="checked" return this.checked }, set(value) { - // But instead of mutating checked in v-model="checked" we should emit event with the value was set this.$emit('update:checked', value) }, }, |