+ {toolbar.position === "above" && !hideToolbar && toolbarView}
+
+
+
+ {...compChildren.selection.getView()(onEvent)}
+ bordered={compChildren.showRowGridBorder.getView()}
+ onChange={(pagination: any, filters: any, sorter: any, extra: any) => {
+ onTableChange(pagination, filters, sorter, extra, comp.dispatch, onEvent);
+ }}
+ showHeader={showHeader}
+ columns={antdColumns}
+ dataSource={pageDataInfo.data}
+ size={size}
+ tableLayout="fixed"
+ pagination={false}
+ summary={summaryView}
+ viewModeResizable={compChildren.viewModeResizable.getView()}
+ rowColorFn={compChildren.rowColor.getView() as any}
+ rowHeightFn={compChildren.rowHeight.getView() as any}
+ columnsStyle={columnsStyle}
+ rowAutoHeight={rowAutoHeight}
+ customLoading={showTableLoading}
+ onCellClick={(columnName: string, dataIndex: string) => {
+ comp.children.selectedCell.dispatchChangeValueAction({
+ name: columnName,
+ dataIndex: dataIndex,
+ });
+ }}
+ mode={mode as 'AUTO' | 'FIXED'}
+ heights={heights}
+ virtualizationConfig={virtualization}
+ // ADD: Style props
+ style={style}
+ toolbarStyle={toolbarStyle}
+ headerStyle={headerStyle}
+ rowStyle={rowStyle}
+ fixedHeader={compChildren.fixedHeader.getView()}
+ showHRowGridBorder={showHRowGridBorder}
+ showVerticalScrollbar={compChildren.showVerticalScrollbar.getView()}
+ showHorizontalScrollbar={compChildren.showHorizontalScrollbar.getView()}
+ />
+
+
+ {toolbar.position === "below" && !hideToolbar && toolbarView}
+
+ );
+});
diff --git a/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableContext.tsx b/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableContext.tsx
new file mode 100644
index 000000000..68c5a56fa
--- /dev/null
+++ b/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableContext.tsx
@@ -0,0 +1,7 @@
+import React from "react";
+import _ from "lodash";
+
+export const TableRowContext = React.createContext<{
+ hover: boolean;
+ selected: boolean;
+}>({ hover: false, selected: false });
diff --git a/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableDynamicColumn.test.tsx b/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableDynamicColumn.test.tsx
new file mode 100644
index 000000000..d38cdb987
--- /dev/null
+++ b/client/packages/lowcoder/src/comps/comps/tableLiteComp/tableDynamicColumn.test.tsx
@@ -0,0 +1,241 @@
+import { TableComp } from "comps/comps/tableComp/tableComp";
+import { columnsToAntdFormat } from "comps/comps/tableComp/tableUtils";
+import { evalAndReduce } from "comps/utils";
+import { reduceInContext } from "comps/utils/reduceContext";
+import _ from "lodash";
+import { changeChildAction, fromValue, SimpleNode } from "lowcoder-core";
+import { JSONObject } from "util/jsonTypes";
+
+const expectColumn = (
+ comp: InstanceType