Skip to content

Commit

Permalink
Editing only text added.
Browse files Browse the repository at this point in the history
  • Loading branch information
russelljtdyer committed Nov 12, 2024
1 parent 031adc1 commit 04545ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions articles/components/grid/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,11 @@ Each selection mode is represented by a [classname]`GridSelectionModel`, accessi

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

Grid allows configuring a predicate to control which rows users may select or deselect. The predicate receives an item and must return `true` to allow selection or `false` to prevent it. This does not prevent programmatic selection changes.
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, prevent programmatic selection changes.

[.example]
--
Expand Down Expand Up @@ -239,7 +240,8 @@ const isItemSelectable = (order: Order) => order.status !== 'complete';
--

[NOTE]
In multi-select mode, the select all checkbox is hidden when using conditional selection. This is because determining the state of the checkbox would require checking all items whenever the selection changes, which could be a performance issue with large data sets or when using lazy data providers.
In multi-select mode, the select all checkbox is hidden when using conditional selection. This is because determining the state of the checkbox would require checking all items whenever the selection changes. That could be a performance issue with large data sets or when using lazy data providers.


== Sorting

Expand Down

0 comments on commit 04545ee

Please sign in to comment.