fix: missing defaults on insert row window

This commit is contained in:
Fabio Di Stasio 2022-07-25 13:09:41 +02:00
parent d3da15aa13
commit 1ead76c028
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,7 @@ const currentValue = ref(null);
const isValidDefault = computed(() => {
if (!foreignList.value.length) return true;
if (props.modelValue === null) return false;
return foreignList.value.some(foreign => foreign.foreign_column.toString() === props.modelValue.toString());
return foreignList.value.some(foreign => foreign.foreign_column.toString() === props.modelValue?.toString());
});
const foreigns = computed(() => {

View File

@ -82,7 +82,7 @@
v-if="isTable"
class="btn btn-dark btn-sm"
:disabled="isQuering"
@click="showFakerModal"
@click="showFakerModal()"
>
<i class="mdi mdi-24px mdi-playlist-plus mr-1" />
<span>{{ $tc('message.insertRow', 2) }}</span>
@ -339,6 +339,7 @@ const pageChange = (direction: 'prev' | 'next') => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const showFakerModal = (row?: any) => {
console.log(row);
if (isQuering.value) return;
isFakerModal.value = true;
rowToDuplicate.value = row;