diff --git a/articles/components/grid/selection.adoc b/articles/components/grid/selection.adoc index 703dc4ca0a..417dea1689 100644 --- a/articles/components/grid/selection.adoc +++ b/articles/components/grid/selection.adoc @@ -9,7 +9,7 @@ order: 40 Grid supports single and multi-select modes. Neither is enabled by default. -=== Single-Selection Mode +== Single-Selection Mode In single-selection mode, the user can select and deselect rows by clicking anywhere on the row. @@ -39,7 +39,7 @@ endif::[] -- -=== Multi-Select Mode +== Multi-Select Mode In multi-select mode, the user can use a checkbox column to select and deselect more than one row -- not necessarily contiguous rows. Or the user can select all rows by clicking on the checkbox in the header row -- and then un-check the ones they don't want to be selected, rather than check many, individually. @@ -100,7 +100,7 @@ selectionModel.setDragSelect(true); -- -=== Selection Modes in Flow +== Selection Modes in Flow Each selection mode is represented by a [classname]`GridSelectionModel`, accessible through the [methodname]`getSelectionModel()` method, which can be cast that to the specific selection model type, [classname]`SingleSelectionModel` or [classname]`MultiSelectionModel`. These interfaces provide selection mode specific APIs for configuration and selection events. @@ -108,7 +108,7 @@ To use Grid with [classname]`Binder` in Flow, you can use [methodname]`asSingleS [role="since:com.vaadin:vaadin@V24.6"] -=== Conditional Selection +== Conditional Selection Grid allows you to configure a predicate to control which rows users may select or deselect. The predicate receives an item and must return `true` to allow selection -- `false` to prevent it. This doesn't, however, prohibit programmatic selection changes.