From cb4b0bdb2284c4773a2dbc9c97aad75fd858dd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Fri, 9 Feb 2024 10:46:54 +0100 Subject: [PATCH 1/5] fix:(ActionInput): listen to correct events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- .../NcActionInput/NcActionInput.vue | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/components/NcActionInput/NcActionInput.vue b/src/components/NcActionInput/NcActionInput.vue index b30dfc73ce..b781c3901d 100644 --- a/src/components/NcActionInput/NcActionInput.vue +++ b/src/components/NcActionInput/NcActionInput.vue @@ -77,13 +77,13 @@ For the `NcSelect` component, all events will be passed through. Please see the - + Please pick a date - + @@ -126,6 +126,7 @@ For the `NcSelect` component, all events will be passed through. Please see the data() { return { color: '#0082C9', + date: new Date(), text: 'This is the input text', multiSelected: [], } @@ -177,8 +178,7 @@ For the `NcSelect` component, all events will be passed through. Please see the :input-class="['mx-input', { focusable: isFocusable }]" class="action-input__datetimepicker" v-bind="$attrs" - @input="onInput" - @change="onChange" /> + @update:model-value="onUpdateModelValue" /> + @update:model-value="onUpdateModelValue" /> + v-bind="$attrs" + @update:model-value="onUpdateModelValue" /> + @update:model-value="onUpdateModelValue" />
@@ -484,13 +482,13 @@ export default { return false } }, - onChange(event) { + onUpdateModelValue(event) { /** - * Emitted on change of the input field + * Emitted on update of the model value * * @type {Event} */ - this.$emit('change', event) + this.$emit('update:modelValue', event) }, }, } From ca553b1e62d74bd345744c1da9281e6e257d2888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Fri, 9 Feb 2024 10:47:22 +0100 Subject: [PATCH 2/5] fix:(ColorPicker): remove doubled emit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- src/components/NcColorPicker/NcColorPicker.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/components/NcColorPicker/NcColorPicker.vue b/src/components/NcColorPicker/NcColorPicker.vue index c0ed27b70f..8902d8da03 100644 --- a/src/components/NcColorPicker/NcColorPicker.vue +++ b/src/components/NcColorPicker/NcColorPicker.vue @@ -300,7 +300,6 @@ export default defineComponent({ 'close', 'update:open', 'update:modelValue', - 'input', ], data() { @@ -387,11 +386,6 @@ export default defineComponent({ */ this.$emit('update:modelValue', color) - /** - * Emits a hexadecimal string e.g. '#ffffff' - */ - this.$emit('input', color) - }, /** From 21443fd58b4407d327e2366d86abcb9e9ed4d322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sun, 11 Feb 2024 10:03:25 +0100 Subject: [PATCH 3/5] fix(NcActionInput): remove input and change from emits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- src/components/NcActionInput/NcActionInput.vue | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/components/NcActionInput/NcActionInput.vue b/src/components/NcActionInput/NcActionInput.vue index b781c3901d..654de9cbb1 100644 --- a/src/components/NcActionInput/NcActionInput.vue +++ b/src/components/NcActionInput/NcActionInput.vue @@ -390,9 +390,7 @@ export default { }, emits: [ - 'input', 'submit', - 'change', 'update:modelValue', ], @@ -452,21 +450,6 @@ export default { this.$refs.datetimepicker.$refs.datepicker.closePopup() } }, - onInput(event) { - /** - * Emitted on input events of the text field - * - * @type {Event|Date} - */ - this.$emit('input', event) - /** - * Emitted when the inputs value changes - * ! DateTimePicker only send the value - * - * @type {string|Date} - */ - this.$emit('update:modelValue', event.target ? event.target.value : event) - }, onSubmit(event) { event.preventDefault() event.stopPropagation() From ff8486ae7c33145653eb5d55f81f44368d319281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Mon, 19 Feb 2024 14:04:07 +0100 Subject: [PATCH 4/5] fix(NcActionInput): add inheritAttrs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- src/components/NcActionInput/NcActionInput.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/NcActionInput/NcActionInput.vue b/src/components/NcActionInput/NcActionInput.vue index 654de9cbb1..da869f5c5a 100644 --- a/src/components/NcActionInput/NcActionInput.vue +++ b/src/components/NcActionInput/NcActionInput.vue @@ -277,6 +277,8 @@ export default { mixins: [ActionGlobalMixin], + inheritAttrs: false, + props: { /** * id attribute of the checkbox element From da0deed4aaee8681719973c5ea86876ae110cd68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Mon, 19 Feb 2024 22:34:51 +0100 Subject: [PATCH 5/5] fix: forward class to NcActionInput root element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- src/components/NcActionInput/NcActionInput.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/NcActionInput/NcActionInput.vue b/src/components/NcActionInput/NcActionInput.vue index da869f5c5a..b26c47be41 100644 --- a/src/components/NcActionInput/NcActionInput.vue +++ b/src/components/NcActionInput/NcActionInput.vue @@ -137,7 +137,7 @@ For the `NcSelect` component, all events will be passed through. Please see the