diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue index fb3ac10c3..de4724e55 100644 --- a/src/components/CrudModel.vue +++ b/src/components/CrudModel.vue @@ -124,11 +124,16 @@ async function onSubmit() { }); } isLoading.value = true; - await saveChanges(); + await saveChanges($props.saveFn ? formData.value : null); } async function saveChanges(data) { - if ($props.saveFn) return $props.saveFn(data, getChanges); + if ($props.saveFn) { + $props.saveFn(data, getChanges); + isLoading.value = false; + hasChanges.value = false; + return; + } const changes = data || getChanges(); try { await axios.post($props.saveUrl || $props.url + '/crud', changes); diff --git a/src/components/ItemsFilterPanel.vue b/src/components/ItemsFilterPanel.vue index f7f07a5b0..94adfe0ff 100644 --- a/src/components/ItemsFilterPanel.vue +++ b/src/components/ItemsFilterPanel.vue @@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n'; import VnInput from 'components/common/VnInput.vue'; import FetchData from 'components/FetchData.vue'; import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue'; -import VnSelectFilter from 'components/common/VnSelectFilter.vue'; +import VnSelect from 'components/common/VnSelect.vue'; import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue'; import axios from 'axios'; @@ -207,7 +207,7 @@ const removeTag = (index, params, search) => { - { - + @@ -246,7 +246,7 @@ const removeTag = (index, params, search) => { class="q-mt-md filter-value" > - { /> - + > + +
- + diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue index 480d36e4f..05c74f00a 100644 --- a/src/components/common/VnSelect.vue +++ b/src/components/common/VnSelect.vue @@ -169,6 +169,7 @@ watch(modelValue, (newValue) => { ref="vnSelectRef" :class="{ required: $attrs.required }" :rules="$attrs.required ? [requiredFieldRule] : null" + virtual-scroll-slice-size="options.length" >