You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -251,6 +251,10 @@ The new data grid can trigger some events while iterating with it.
251
251
252
252
Triggers an action (such as a nanoflow, microflow, or Show page action) when the end-user clicks in one of the rows. It also adds a pointer cursor to signal that it is clickable. This function also complies with accessibility features and can be reached using only the keyboard.
253
253
254
+
### On Selection Change Action
255
+
256
+
Triggers an action (such as a nanoflow, microflow, or client action) when the end-user changes selection in the data grid. This includes selecting or deselecting individual rows, using the **Select all** toggle, or clearing the selection. The action provides a way to respond to selection state changes and implement custom logic based on the current selection.
257
+
254
258
## Filters {#filters}
255
259
256
260
Data Grid 2 uses a modular filtering system with dedicated filter widgets that can be placed in two locations:
@@ -597,6 +601,36 @@ The setting for action triggers is related to the selection method and can somet
597
601
598
602
To achieve this behavior, set the **On click trigger** to **Double click**. When a data grid is configured this way, the user may select a row by double-clicking it.
599
603
604
+
### Selection and Header Actions
605
+
606
+
When the button is placed in a grid header, the assigned action can receive the currently selected rows as a parameter.
607
+
608
+
#### How Selection is Passed to Actions
609
+
610
+
When a button placed in header triggers a **microflow** or **nanoflow**, the selected rows are passed as input:
611
+
612
+
- If **Single Selection** is enabled:
613
+
- The action receives a **single object**.
614
+
- If **Multiple Selection** is enabled:
615
+
- The action receives a **list of objects**.
616
+
617
+
This allows developers to build logic that operates on one or several items.
618
+
619
+
#### Example Use Cases
620
+
621
+
-**Mark as Done**: A button triggers a microflow that updates the status of selected tasks.
622
+
-**Delete Selected**: A button deletes all selected records.
623
+
-**Export Selected**: A button triggers a microflow or nanoflow that exports the selected list to a file.
624
+
625
+
#### Configuration
626
+
627
+
To configure selection, do the following:
628
+
629
+
1. Enable **Selection** in the data grid 2 widget.
630
+
1. Insert an **Action Button** into the **Header**.
631
+
1. Configure the button to trigger a microflow or nanoflow.
632
+
1. Set the input parameter of the flow to match the selection type (single object or list).
0 commit comments