diff --git a/components/EntityList.vue b/components/EntityList.vue index 4bdea06..b1b9060 100644 --- a/components/EntityList.vue +++ b/components/EntityList.vue @@ -58,8 +58,8 @@ const dataType = dataStore.dataTypes[type] const selectedItem = ref(0) -const selectedColumns = ref(dataType.templateColumns.filter(i => !i.disabledInTable)) -const columns = computed(() => dataType.templateColumns.filter((column) => !column.disabledInTable && selectedColumns.value.includes(column))) +const selectedColumns = ref(tempStore.columns[type] ? tempStore.columns[type] : dataType.templateColumns.filter(i => !i.disabledInTable)) +const columns = computed(() => dataType.templateColumns.filter((column) => !column.disabledInTable && selectedColumns.value.find(i => i.key === column.key))) const searchString = ref(tempStore.searchStrings[props.type] ||'') @@ -151,6 +151,7 @@ const filteredRows = computed(() => { by="key" :color="selectedColumns.length !== dataType.templateColumns.filter(i => !i.disabledInTable).length ? 'primary' : 'white'" :ui-menu="{ width: 'min-w-max' }" + @change="tempStore.modifyColumns(type,selectedColumns)" >