File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
client/packages/lowcoder/src/comps/comps/tableLiteComp/parts Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import BaseTable , { BaseTableProps } from "./BaseTable" ;
3
+
4
+ export interface AutoModeTableProps < RecordType > extends BaseTableProps < RecordType > {
5
+ // No additional props needed - auto mode is simple!
6
+ }
7
+
8
+ function AutoModeTableComp < RecordType extends object > ( props : AutoModeTableProps < RecordType > ) {
9
+ const { ...baseProps } = props ;
10
+
11
+ // Auto mode configuration: natural growth, no height constraints
12
+ return (
13
+ < BaseTable < RecordType >
14
+ { ...baseProps }
15
+ // Override any height-related props for auto mode
16
+ containerHeight = { undefined }
17
+ isFixedHeight = { false }
18
+ />
19
+ ) ;
20
+ }
21
+
22
+ const AutoModeTable = React . memo ( AutoModeTableComp ) as typeof AutoModeTableComp ;
23
+ export default AutoModeTable ;
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import BaseTable , { BaseTableProps } from "./BaseTable" ;
3
+
4
+ export interface FixedModeTableProps < RecordType > extends BaseTableProps < RecordType > {
5
+ bodyHeight : number ;
6
+ }
7
+
8
+ function FixedModeTableComp < RecordType extends object > ( props : FixedModeTableProps < RecordType > ) {
9
+ const { bodyHeight, ...baseProps } = props ;
10
+
11
+ // Fixed mode configuration: height constraints and internal scrolling
12
+ return (
13
+ < BaseTable < RecordType >
14
+ { ...baseProps }
15
+ containerHeight = { bodyHeight }
16
+ isFixedHeight = { true }
17
+ />
18
+ ) ;
19
+ }
20
+
21
+ const FixedModeTable = React . memo ( FixedModeTableComp ) as typeof FixedModeTableComp ;
22
+ export default FixedModeTable ;
You can’t perform that action at this time.
0 commit comments