fix: wagon reload
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-09-18 13:46:37 +02:00
parent fb1a94604b
commit 9db12a8dee
2 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ async function remove(row) {
url-create="WagonTypes"
model="WagonType"
:form-initial-data="initialData"
@on-data-saved="window.location.reload()"
@on-data-saved="tableRef.reload()"
auto-load
>
<template #form-inputs="{ data }">

View File

@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import VnTable from 'src/components/VnTable/VnTable.vue';
import { computed } from 'vue';
import { computed, ref } from 'vue';
import VnSelect from 'src/components/common/VnSelect.vue';
import VnInput from 'src/components/common/VnInput.vue';
@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
const store = arrayData.store;
const router = useRouter();
const { t } = useI18n();
const tableRef = ref();
const filter = {
include: {
relation: 'type',
@ -108,7 +108,7 @@ async function remove(row) {
urlCreate: 'Wagons',
title: t('Create new wagon'),
onDataSaved: () => {
window.location.reload();
tableRef.reload();
},
formInitialData: {},
}"