Skip to content

Commit

Permalink
fix: missing defaults on insert row window
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Jul 25, 2022
1 parent d3da15a commit 1ead76c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/renderer/components/ForeignKeySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/components/WorkspaceTabTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1ead76c

Please sign in to comment.