-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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,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. | ||
|
||
|