SelectionState Plugin Reference

A plugin that manages the selection state.


Use the following statement to import the plugin:

import { SelectionState } from '@devexpress/dx-react-grid';

User Reference




Name Type Default Description
selection? Array<number | string> The selected row's IDs.
defaultSelection? Array<number | string> [] The initially selected rows in the uncontrolled mode.
onSelectionChange? (selection: Array<number | string>) => void Handles selection changes.

Plugin Developer Reference


Name Plugin Type Description
rows Getter Array<any> Rows to be rendered.
getRowId Getter (row: any) => number | string A function used to get a unique row identifier.


Name Plugin Type Description
toggleSelection Action ({ rowIds: Array<number | string>, state?: boolean }) => void A function that selects/deselects rows. The state argument specifies whether the rows should be selected (true), deselected (false), or their selection status should be set to the opposite value (undefined). To select/deselect a single row, pass an array with a single item to the rowIds argument.
selection Getter Array<number | string> The selected row's IDs.