Skip to content

Commit 99d132f

Browse files
authored
Expose processedData in DataTable (#8181)
1 parent 24b8fd5 commit 99d132f

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

components/lib/datatable/DataTable.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,8 @@ export const DataTable = React.forwardRef((inProps, ref) => {
15971597
setSortMeta: (sorts) => setMultiSortMetaState(sorts),
15981598
getElement: () => elementRef.current,
15991599
getTable: () => tableRef.current,
1600-
getVirtualScroller: () => virtualScrollerRef.current
1600+
getVirtualScroller: () => virtualScrollerRef.current,
1601+
getProcessedData: () => processedData()
16011602
}));
16021603

16031604
const createLoader = () => {

components/lib/datatable/datatable.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,4 +2061,9 @@ export declare class DataTable<TValue extends DataTableValueArray> extends React
20612061
* @return {VirtualScroller | null} Virtual scroller instance
20622062
*/
20632063
public getVirtualScroller(): VirtualScroller | null;
2064+
/**
2065+
* Used to get the processed data.
2066+
* @return {TValue} sorted and filtered data
2067+
*/
2068+
public getProcessedData(): TValue;
20642069
}

0 commit comments

Comments
 (0)