fix(CrudModel, VnSelect): improve loading state handling and condition checks
gitea/salix-front/pipeline/pr-master Something is wrong with the build of this commit
Details
gitea/salix-front/pipeline/pr-master Something is wrong with the build of this commit
Details
This commit is contained in:
parent
71ae35be26
commit
650b205a04
|
@ -299,7 +299,7 @@ watch(formUrl, async () => {
|
|||
</script>
|
||||
<template>
|
||||
<SkeletonTable
|
||||
v-if="!formData && ($attrs['auto-load'] == '' || $attrs['auto-load'])"
|
||||
v-if="!formData && ($attrs['auto-load'] === '' || $attrs['auto-load'])"
|
||||
:columns="$attrs.columns?.length"
|
||||
/>
|
||||
<VnPaginate
|
||||
|
|
|
@ -183,8 +183,7 @@ const arrayData = useArrayData(arrayDataKey, {
|
|||
searchUrl: false,
|
||||
mapKey: $attrs['map-key'],
|
||||
});
|
||||
const arrayDataIsLoading = computed(() => arrayData.isLoading);
|
||||
|
||||
const someIsLoading = computed(() => isLoading.value || arrayData.isLoading);
|
||||
function findKeyInOptions() {
|
||||
if (!$props.options) return;
|
||||
return filter($props.modelValue, $props.options)?.length;
|
||||
|
@ -367,8 +366,8 @@ function getCaption(opt) {
|
|||
virtual-scroll-slice-size="options.length"
|
||||
hide-bottom-space
|
||||
:input-debounce="useURL ? '300' : '0'"
|
||||
:loading="isLoading || arrayDataIsLoading"
|
||||
:disable="isLoading || arrayDataIsLoading"
|
||||
:loading="someIsLoading"
|
||||
:disable="someIsLoading"
|
||||
@virtual-scroll="onScroll"
|
||||
@keydown="handleKeyDown"
|
||||
:data-cy="$attrs.dataCy ?? $attrs.label + '_select'"
|
||||
|
|
Loading…
Reference in New Issue