UNPKG

@progress/kendo-angular-grid

Version:

Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.

81 lines (80 loc) 2.76 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Defines the settings for sorting a Grid column. */ export interface ColumnSortSettings { /** * Enables removing the column sorting. */ allowUnsort?: boolean; /** * Sets the initial sort direction when sorting from the unsorted state. */ initialDirection?: 'asc' | 'desc'; } /** * Specifies settings for sorting by a single column. */ export interface SingleSortSettings extends ColumnSortSettings { /** * Sets the sort mode of the Grid. */ mode?: 'single'; } /** * Specifies a modifier key for multiple column sorting [see example](slug:multi_sort_grid#toc-sort-key-modifier). * * @example * ```html * <kendo-grid [sortable]="{ mode: 'multiple', multiSortKey: 'shift' }"> * <kendo-grid-column field="ProductID"></kendo-grid-column> * ... * </kendo-grid> * ``` */ export type ModifierKey = 'none' | 'ctrl' | 'shift' | 'alt'; /** * Specifies settings for sorting by multiple columns. [see example](slug:multi_sort_grid). */ export interface MultipleSortSettings extends ColumnSortSettings { /** * Sets the sort mode of the Grid. */ mode?: 'multiple'; /** * Shows sort-sequence indicators for sorting multiple columns. */ showIndexes?: boolean; /** * Sets the modifier key for sorting by a second or more columns. * * By default, clicking a column adds it to the sort order (`'none'`). * Selecting a key modifier with the click removes sorting from all other columns. * * If set to `'ctrl'`, `'shift'`, or `'alt'`, clicking a column removes sorting from all other columns. * The specified key must be pressed to add the column to the sort order. * The `ctrl` value matches the `Command` key on macOS [see example](slug:multi_sort_grid#toc-sort-key-modifier). */ multiSortKey?: ModifierKey; } /** * Defines the settings for sorting the Grid. [See example](slug:multi_sort_grid). * * The available options are: * * `boolean` * * [SingleSortSettings]({% slug api_grid_singlesortsettings %}) * * [MultipleSortSettings]({% slug api_grid_multiplesortsettings %}) * * @example * ```html * <kendo-grid [sorting]="true"></kendo-grid> * ``` */ export type SortSettings = boolean | SingleSortSettings | MultipleSortSettings; /** * @hidden */ export declare const normalize: (...settings: (SortSettings | ColumnSortSettings)[]) => any;