From ebf329bfc6ccdd8041166e5b596d479ab32f40b6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 17 Jul 2024 20:33:55 +0200 Subject: [PATCH] feat: addRow withour dialog --- src/components/VnTable/VnTable.vue | 23 +++++++-- src/pages/Item/ItemFixedPrice.vue | 80 +++++++++++++++++------------- 2 files changed, 66 insertions(+), 37 deletions(-) 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(_); +}