diff --git a/src/pages/unitTable/index.tsx b/src/pages/unitTable/index.tsx index fbd007c..9074aa3 100644 --- a/src/pages/unitTable/index.tsx +++ b/src/pages/unitTable/index.tsx @@ -15,6 +15,7 @@ export type extraType = { rowKey: string; showTotalCell: boolean; isSpecial: boolean; + showRowSelection: boolean; }; const UnitTable: FC = (props) => { const [unitTableType, setUnitTableType] = useState(""); @@ -48,7 +49,8 @@ const UnitTable: FC = (props) => { rowKey, showTotalCell = false, sumDataSource = {}, - isSpecial = false + isSpecial = false, + showRowSelection = true } = data; setI18n(i18n); setColumns(columns); @@ -63,6 +65,7 @@ const UnitTable: FC = (props) => { rowKey, showTotalCell, isSpecial, + showRowSelection, selectedRowKeys: [...(extraParams.selectedRowKeys as string[] | number[]), ...rowKeys] }); } @@ -99,7 +102,7 @@ const UnitTable: FC = (props) => { columns={renderCols(columns, unitTableType, i18n, extraParams)} scroll={{ x: 1200, y: `calc(100vh - ${extraParams?.scrollHeight || 109}px)` }} bordered={_.some(columns, (k) => k.children)} - rowSelection={!_.isNil(extraParams?.selectedRowKeys) ? rowSelection : undefined} + rowSelection={extraParams?.showRowSelection ? rowSelection : undefined} pagination={!_.isNil(pageInfo) ? { ...paginationAction(pageInfo, i18n, onChange), size: "default" } : false} summary={() => !extraParams.showTotalCell ? (