Skip to content

Commit

Permalink
raise headings level
Browse files Browse the repository at this point in the history
  • Loading branch information
vursen committed Dec 19, 2024
1 parent b7d477c commit 6881ab2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions articles/components/grid/selection.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -100,15 +100,15 @@ 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.

To use Grid with [classname]`Binder` in Flow, you can use [methodname]`asSingleSelect()` or [methodname]`asMultiSelect()`, depending on the currently defined selection mode. Both methods return interfaces that implement the [interfacename]`HasValue` interface for use with `Binder`.


[role="since:com.vaadin:[email protected]"]
=== 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.

Expand Down

0 comments on commit 6881ab2

Please sign in to comment.