refactor(VnCard): use prop.url when init
gitea/salix-front/pipeline/pr-dev This commit is unstable Details

This commit is contained in:
Alex Moreno 2025-03-31 13:27:28 +02:00
parent 519ae66226
commit 95950b7485
1 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ const route = useRoute();
const stateStore = useStateStore();
const router = useRouter();
const entityId = computed(() => props.id || route?.params?.id);
let arrayData = getArrayData();
let arrayData = getArrayData(props.url);
onBeforeRouteLeave(() => {
stateStore.cardDescriptorChangeValue(null);
@ -75,9 +75,9 @@ function formatUrl(id) {
return props.url.replace(regex, `/${newId}`);
}
function getArrayData() {
function getArrayData(url = formatUrl()) {
return useArrayData(props.dataKey, {
url: formatUrl(),
url,
userFilter: props.filter,
oneRecord: true,
});