BugFix for: cannot resize columns after saving a table

This commit is contained in:
navaneeth 2021-04-21 19:16:50 +05:30
parent 6b6cb0ee2e
commit 98dd5bbacd

View file

@ -49,7 +49,8 @@ export function Table({ id, width, height, component, onComponentClick, currentS
const columnSizes = component.definition.properties.columnSizes;
const columnData = component.definition.properties.columns.value.map((column) => {
return { Header: column.name, accessor: column.key || column.name, width: columnSizes ? `${columnSizes[column.key] || columnSizes[column.name]}` : defaultColumn.width }
const columnSize = columnSizes[column.key] || columnSizes[column.name];
return { Header: column.name, accessor: column.key || column.name, width: columnSize ? columnSize : defaultColumn.width}
})
let tableData = []