|
|
@@ -286,6 +286,7 @@ export const addTable = (draw: DrawExpose) => {
|
|
|
};
|
|
|
|
|
|
export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
+ const tempTable = copy(table)
|
|
|
const tempRow = table.content[table.content.length - 1];
|
|
|
const presetIndex = table.content.findIndex(
|
|
|
(row) => row[0].key === "preset-col",
|
|
|
@@ -335,11 +336,12 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
table.content[rowNdx][colNdx + 1].content = val;
|
|
|
table.content[rowNdx][colNdx + 1].joinId = item.id;
|
|
|
} else {
|
|
|
- table.height += defaultTableStyle.colHeight;
|
|
|
+ const height = tempTable.content[rowNdx]?.[colNdx]?.height || defaultTableStyle.colHeight
|
|
|
+ table.height += height;
|
|
|
let cols = [
|
|
|
{
|
|
|
...tempRow[0],
|
|
|
- height: defaultTableStyle.colHeight,
|
|
|
+ height: height,
|
|
|
content: item.hideSerial ? '' : item.content!,
|
|
|
readonly: false,
|
|
|
hidden: false,
|
|
|
@@ -347,7 +349,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
},
|
|
|
{
|
|
|
...tempRow[1],
|
|
|
- height: defaultTableStyle.colHeight,
|
|
|
+ height: height,
|
|
|
content: val,
|
|
|
readonly: false,
|
|
|
hidden: false,
|
|
|
@@ -359,7 +361,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
cols.push(
|
|
|
{
|
|
|
...tempRow[2],
|
|
|
- height: defaultTableStyle.colHeight,
|
|
|
+ height,
|
|
|
readonly: false,
|
|
|
content: "",
|
|
|
hidden: false,
|
|
|
@@ -367,7 +369,7 @@ export const syncTable = (table: TableData, items: SerialData[]) => {
|
|
|
},
|
|
|
{
|
|
|
...tempRow[3],
|
|
|
- height: defaultTableStyle.colHeight,
|
|
|
+ height:height,
|
|
|
content: "",
|
|
|
readonly: false,
|
|
|
hidden: false,
|