1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: context menu option to duplicate a table row

This commit is contained in:
2022-07-19 17:48:51 +02:00
parent 78902639eb
commit 985e5d3527
5 changed files with 100 additions and 38 deletions

View File

@@ -13,7 +13,7 @@
</template>
<script setup lang="ts">
import { computed, Ref, ref } from 'vue';
import { computed, Ref, ref, watch } from 'vue';
import { storeToRefs } from 'pinia';
import Tables from '@/ipc-api/Tables';
import { useNotificationsStore } from '@/stores/notifications';
@@ -40,7 +40,7 @@ const { getSelected: selectedWorkspace } = storeToRefs(workspacesStore);
const editField: Ref<HTMLSelectElement> = ref(null);
const foreignList = ref([]);
const currentValue = ref(props.modelValue);
const currentValue = ref(null);
const isValidDefault = computed(() => {
if (!foreignList.value.length) return true;
@@ -66,6 +66,10 @@ const cutText = (val: string) => {
return val.length > 15 ? `${val.substring(0, 15)}...` : val;
};
watch(() => props.modelValue, () => {
currentValue.value = props.modelValue;
});
let foreignDesc: string | false;
const params = {
uid: selectedWorkspace.value,