fix load saved data
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { CachedData, CachedSelectedAppData, SavedData, WhereCondition } from '@/types/model';
|
||||
import { defineProps, defineEmits, inject, computed, ref, reactive, render, h, watch, onMounted } from 'vue';
|
||||
import { defineProps, inject, computed, render, h } from 'vue';
|
||||
import TableCombobox from './TableCombobox.vue';
|
||||
import { getFieldsDropdownItems } from '@/js/helper';
|
||||
import type { ConditionValue } from '@/js/conditions';
|
||||
@@ -27,11 +27,11 @@ const columns = [
|
||||
render: (cellData: string, rowData: any, rowIndex: number) => {
|
||||
const container = document.createElement('div');
|
||||
const vnode = h(TableCombobox, {
|
||||
items: getFieldsDropdownItems(selectedAppData.appFields, {
|
||||
items: computed(() => getFieldsDropdownItems(selectedAppData.appFields, {
|
||||
subTableCode: table.value,
|
||||
defaultLabel: 'すべてのレコード',
|
||||
}),
|
||||
modelValue: '',
|
||||
})),
|
||||
modelValue: props.modelValue[rowIndex].field,
|
||||
selectedAppData,
|
||||
'onUpdate:modelValue': (newValue: string) => {
|
||||
props.modelValue[rowIndex].field = newValue;
|
||||
@@ -49,7 +49,7 @@ const columns = [
|
||||
render: (cellData: string, rowData: any, rowIndex: number) => {
|
||||
const container = document.createElement('div');
|
||||
const vnode = h(TableCondition, {
|
||||
modelValue: '',
|
||||
modelValue: props.modelValue[rowIndex].condition,
|
||||
index: rowIndex,
|
||||
selectedAppData,
|
||||
whereConditions: props.modelValue,
|
||||
@@ -68,7 +68,7 @@ const columns = [
|
||||
render: (cellData: string, rowData: any, rowIndex: number) => {
|
||||
const container = document.createElement('div');
|
||||
const vnode = h(TableConditionValue, {
|
||||
modelValue: '',
|
||||
modelValue: props.modelValue[rowIndex].data,
|
||||
index: rowIndex,
|
||||
selectedAppData,
|
||||
whereConditions: props.modelValue,
|
||||
|
||||
Reference in New Issue
Block a user