Content-Length: 279057 | pFad | http://github.com/lowcoder-org/lowcoder/commit/5bef239d9af0f3eeeb66064dbc329b269eb09838

4B Adding selectAll function to Table · lowcoder-org/lowcoder@5bef239 · GitHub
Skip to content

Commit 5bef239

Browse files
author
FalkWolsky
committed
Adding selectAll function to Table
1 parent 9f8b89b commit 5bef239

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

client/packages/lowcoder/src/comps/comps/tableComp/tableComp.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,19 @@ TableTmpComp = withMethodExposing(TableTmpComp, [
690690
comp.children.selection.children.selectedRowKeys.dispatchChangeValueAction([]);
691691
},
692692
},
693+
{
694+
method: {
695+
name: "selectAll",
696+
description: "Select all rows in the current filtered view",
697+
params: [],
698+
},
699+
execute: (comp) => {
700+
const displayData = comp.filterData ?? [];
701+
const allKeys = displayData.map((row) => row[OB_ROW_ORI_INDEX] + "");
702+
comp.children.selection.children.selectedRowKey.dispatchChangeValueAction(allKeys[0] || "0");
703+
comp.children.selection.children.selectedRowKeys.dispatchChangeValueAction(allKeys);
704+
},
705+
},
693706
{
694707
method: {
695708
name: "cancelChanges",

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/lowcoder-org/lowcoder/commit/5bef239d9af0f3eeeb66064dbc329b269eb09838

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy