Merge branch 'dev' into 8406-crudModelUpdate
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Pau Rovira 2025-04-17 11:31:28 +00:00
commit 35914be54a
1 changed files with 11 additions and 10 deletions

View File

@ -152,6 +152,16 @@ const value = computed({
},
});
const arrayDataKey =
$props.dataKey ??
($props.url?.length > 0 ? $props.url : ($attrs.name ?? $attrs.label));
const arrayData = useArrayData(arrayDataKey, {
url: $props.url,
searchUrl: false,
mapKey: $attrs['map-key'],
});
const computedSortBy = computed(() => {
return $props.sortBy || $props.optionLabel + ' ASC';
});
@ -176,16 +186,7 @@ onMounted(() => {
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
});
const arrayDataKey =
$props.dataKey ??
($props.url?.length > 0 ? $props.url : ($attrs.name ?? $attrs.label));
const arrayData = useArrayData(arrayDataKey, {
url: $props.url,
searchUrl: false,
mapKey: $attrs['map-key'],
});
const someIsLoading = computed(() => isLoading.value || arrayData.isLoading);
const someIsLoading = computed(() => isLoading.value || arrayData?.isLoading?.value);
function findKeyInOptions() {
if (!$props.options) return;
return filter($props.modelValue, $props.options)?.length;