diff --git a/src/FormsSettings.vue b/src/FormsSettings.vue index 275bd9e92..57cddb93b 100644 --- a/src/FormsSettings.vue +++ b/src/FormsSettings.vue @@ -30,15 +30,14 @@ @update:checked="onRestrictCreationChange"> {{ t('forms', 'Restrict form creation to selected groups') }} - + @input="onCreationAllowedGroupsChange" /> - + @input="onInput" />
    @@ -87,7 +87,7 @@ import { emit } from '@nextcloud/event-bus' import { generateOcsUrl } from '@nextcloud/router' import axios from '@nextcloud/axios' import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox.js' -import NcMultiselect from '@nextcloud/vue/dist/Components/NcMultiselect.js' +import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js' import AnswerInput from './AnswerInput.vue' import QuestionMixin from '../../mixins/QuestionMixin.js' @@ -100,7 +100,7 @@ export default { components: { AnswerInput, NcActionCheckbox, - NcMultiselect, + NcSelect, }, mixins: [QuestionMixin], @@ -173,15 +173,14 @@ export default { }, methods: { - onSelect(option) { - // Simple select - if (!this.isMultiple) { - this.$emit('update:values', [option.id]) + onInput(option) { + if (Array.isArray(option)) { + this.$emit('update:values', [...new Set(option.map((opt) => opt.id))]) return } - // Emit values and remove duplicates - this.$emit('update:values', [...new Set(option.id)]) + // Simple select + this.$emit('update:values', option ? [option.id] : []) }, /** diff --git a/src/components/SidebarTabs/SharingSearchDiv.vue b/src/components/SidebarTabs/SharingSearchDiv.vue index 37d83f501..d4a2d9151 100644 --- a/src/components/SidebarTabs/SharingSearchDiv.vue +++ b/src/components/SidebarTabs/SharingSearchDiv.vue @@ -23,27 +23,20 @@