SortEvent

Represents event arguments for sort complete events in the Data Grid. Provides details about the completed sort operation, including column and direction. Used to handle post-sort logic or UI updates in the grid header.

Props

The following table outlines the props for the SortEvent:

NameTypeDefaultDescription
action
string | ActionType
-

Indicates the type of sort action that was completed (e.g., 'Sorting', 'ClearSorting'). Describes the operation performed, aiding in post-sort processing. Helps differentiate between various sort-related actions.

columns
[ ]

Contains an array of active sort descriptors. Each descriptor defines a column field and its sort direction. Useful for retrieving the current sort state across multiple columns.

direction
SortDirection | string
SortDirection.Ascending | 'Ascending'

Defines the direction of the completed sort operation for the column. Indicates whether the column was sorted in ascending or descending order, typically from the SortDirection enum.

event
MouseEvent | KeyboardEvent
null

The React event that triggered the sort operation. Can be a mouse or keyboard event, depending on the interaction type. Provides access to event metadata such as the target element, key pressed, or mouse coordinates, enabling contextual handling of sort logic.

field
string
-

Specifies the field name of the column that was sorted. Identifies the column in the data source affected by the completed sort operation. Useful for logging or updating UI after sorting.