Skip to content

Commit b4d8782

Browse files
authored
Merge pull request #10272 from yordan-st/patch-3
Update data-grid-2.md
2 parents a13e03b + f830bdd commit b4d8782

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

  • content/en/docs/marketplace/platform-supported-content/modules/data-widgets

content/en/docs/marketplace/platform-supported-content/modules/data-widgets/data-grid-2.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ The new data grid can trigger some events while iterating with it.
251251

252252
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.
253253

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+
254258
## Filters {#filters}
255259

256260
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
597601

598602
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.
599603

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).
633+
600634
## Keyboard Support {#keyboard-support}
601635

602636
| Key | Function |

0 commit comments

Comments
 (0)