Skip to content

Commit

Permalink
First pass at editing new text, only.
Browse files Browse the repository at this point in the history
  • Loading branch information
russelljtdyer committed Dec 23, 2024
1 parent a0874a0 commit bcd0a4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions articles/components/grid/selection.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ endif::[]

=== Range Selection

In addition to selecting rows individually, you may want to enable users to select or deselect a range of rows using kbd:[Shift] + Click. Since there is a variety of possible behaviors for range selection, Grid provides the necessary event, `item-toggle`, to create your own implementation. This event provides information about the toggled row, its selection state, and whether the user was holding kbd:[Shift] during the toggle.
In addition to selecting rows individually, you may want to allow users to select or deselect a range of rows using kbd:[Shift] + Click. Since there is a variety ways for range selection, Grid provides the necessary event, `item-toggle` to create your own implementation. This event provides information about the toggled row, its selection state, and whether the user was holding kbd:[Shift] during the toggle.

The example below demonstrates a possible implementation of range selection using that event. In this implementation, the first clicked row is stored as an anchor point. When the user holds kbd:[Shift] and clicks another row, the selection state of all rows between the anchor and the newly clicked row is updated to match the clicked row's state. The clicked row then becomes the new anchor point for future selections.
The example below demonstrates a possible implementation of range selection using that event. In this implementation, the first clicked row is stored as an anchor point. When the user holds kbd:[Shift] and clicks another row, the selection state of all rows between the anchor and the newly clicked row is updated to match the clicked row's state. The second clicked row then becomes the new anchor point for future selections.

[.example]
--
Expand All @@ -98,7 +98,7 @@ include::{root}/frontend/demo/component/grid/react/grid-range-selection.tsx[rend
endif::[]
--

A range of rows can also be selected by dragging from one selection checkbox to another, if enabled:
A range of rows can also be selected by dragging from one selection checkbox to another, if that's enabled:

[.example]
--
Expand Down

0 comments on commit bcd0a4d

Please sign in to comment.