diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 97053184a..4592a60cc 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -45,6 +45,10 @@ const $props = defineProps({ type: Object, default: null, }, + createAsDialog: { + type: Boolean, + default: true, + }, cardClass: { type: String, default: 'flex-one', @@ -239,6 +243,11 @@ defineExpose({ redirect: redirectFn, selected, }); + +function handleOnDataSaved(_, res) { + if (_.onDataSaved) _.onDataSaved(this); + else $props.create.onDataSaved(_); +}