@stonecrop/atable 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ export const createTableStore = (initData: {
56
56
  defaultDisplay[rowIndex] = {
57
57
  childrenOpen: false,
58
58
  expanded: false,
59
- indent: row.indent || null,
59
+ indent: row.indent || 0,
60
60
  isParent: parents.has(rowIndex),
61
61
  isRoot: row.parent === null || row.parent === undefined,
62
62
  rowModified: false,
@@ -85,7 +85,9 @@ export const createTableStore = (initData: {
85
85
  return `${indent}ch`
86
86
  })
87
87
 
88
- const zeroColumn = computed(() => ['list', 'tree', 'list-expansion'].includes(config.value.view))
88
+ const zeroColumn = computed(() =>
89
+ config.value.view ? ['list', 'tree', 'list-expansion'].includes(config.value.view) : false
90
+ )
89
91
 
90
92
  // actions
91
93
  const getCellData = <T = any>(colIndex: number, rowIndex: number): T => table.value[`${colIndex}:${rowIndex}`]
@@ -113,7 +115,7 @@ export const createTableStore = (initData: {
113
115
  const getHeaderCellStyle = (column: TableColumn): CSSProperties => ({
114
116
  minWidth: column.width || '40ch',
115
117
  textAlign: column.align || 'center',
116
- width: config.value.fullWidth ? 'auto' : null,
118
+ width: config.value.fullWidth ? 'auto' : undefined,
117
119
  })
118
120
 
119
121
  const isRowVisible = (rowIndex: number) => {