Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8277-createEntryControl

This commit is contained in:
Jorge Penadés 2025-04-17 12:26:26 +02:00
commit 0009ed8fdd
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;