From 8f869a71cd2ff424f1dd33dedcef9789c0265db7 Mon Sep 17 00:00:00 2001 From: Jon Stevens Date: Tue, 24 Sep 2019 20:38:08 +0700 Subject: [PATCH] refactor(grid-core): reuse SortingDirection (#2327) --- packages/dx-grid-core/src/types/sorting.types.ts | 4 ++-- packages/dx-react-grid/api/dx-react-grid.api.md | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/dx-grid-core/src/types/sorting.types.ts b/packages/dx-grid-core/src/types/sorting.types.ts index 1fb249806c..29a5e73779 100644 --- a/packages/dx-grid-core/src/types/sorting.types.ts +++ b/packages/dx-grid-core/src/types/sorting.types.ts @@ -3,15 +3,15 @@ import { GridColumnExtension } from './table.types'; import { Row, GetCellValueFn, IsSpecificRowFn, GetRowLevelKeyFn } from './grid-core.types'; import { CompareFn } from './merge-sort.types'; +export type SortingDirection = 'asc' | 'desc'; /** Describes the sorting applied to a column */ export interface Sorting { /** Specifies a column's name to which the sorting is applied. */ columnName: string; /** Specifies a column's sorting order. */ - direction: 'asc' | 'desc'; + direction: SortingDirection; } -export type SortingDirection = 'asc' | 'desc'; /** @internal */ export type SortingColumnExtension = GridColumnExtension & { sortingEnabled?: boolean }; /** @internal */ diff --git a/packages/dx-react-grid/api/dx-react-grid.api.md b/packages/dx-react-grid/api/dx-react-grid.api.md index a9355e3ff2..804c6480e9 100644 --- a/packages/dx-react-grid/api/dx-react-grid.api.md +++ b/packages/dx-react-grid/api/dx-react-grid.api.md @@ -580,7 +580,7 @@ export interface SelectionStateProps { // @public export interface Sorting { columnName: string; - direction: 'asc' | 'desc'; + direction: SortingDirection; } // @public (undocumented) @@ -1350,3 +1350,4 @@ export interface VirtualTableStateProps { // (No @packageDocumentation comment for this package) ``` +