diff --git a/src/FMFlatTable.tsx b/src/FMFlatTable.tsx index c706f3d..c66eede 100644 --- a/src/FMFlatTable.tsx +++ b/src/FMFlatTable.tsx @@ -9,9 +9,10 @@ export interface FMFlatTableRef extends IFMFlatTable { export interface FMFlatTableProps { state?: StateInputParams; options?: IFMFlatTableOptionsInputParams; + name?: string; } -const FMFlatTable = forwardRef(({ state, options }, ref) => { +const FMFlatTable = forwardRef(({ state, options, name }, ref) => { if (typeof window === 'undefined') { return null; } @@ -45,7 +46,7 @@ const FMFlatTable = forwardRef(({ state, optio }); useEffect(() => { - const flatTable = FlatTable(containerId, { state, options }); + const flatTable = FlatTable(containerId, { state, options, name}); flatTableRef.current = flatTable; return () => { flatTableRef.current?.dispose(); diff --git a/src/FMPivotTable.tsx b/src/FMPivotTable.tsx index 97b51f1..ff0cc9f 100644 --- a/src/FMPivotTable.tsx +++ b/src/FMPivotTable.tsx @@ -9,9 +9,10 @@ export interface FMPivotTableRef extends IFMPivotTable { export interface FMPivotTableProps { state?: StateInputParams; options?: IFMPivotTableOptionsInputParams; + name?: string; } -const FMPivotTable = forwardRef(({ state, options }, ref) => { +const FMPivotTable = forwardRef(({ state, options, name }, ref) => { if (typeof window === 'undefined') { return null; } @@ -45,7 +46,7 @@ const FMPivotTable = forwardRef(({ state, op }); useEffect(() => { - const pivotTable = PivotTable(containerId, { state, options }); + const pivotTable = PivotTable(containerId, { state, options, name }); pivotTableRef.current = pivotTable; return () => { pivotTableRef.current?.dispose();