CustomSortApi
Provides run-time access to the Custom Sort function
export interfaceMethods
| Method | Description |
|---|---|
| addCustomSort(customSort) | Adds a Custom Sort to Custom Sort collection in Adaptable State |
| createCustomSort(params) | Creates new Custom Sort based on given values |
| deleteCustomSort(columnId) | Removes Custom Sort for a given ColumnId |
| editCustomSort(customSort) | Edits a Custom Sort |
| editCustomSortValues(columnId, values) | Updates existing Custom Sort with new set of Sorted Values |
| getActiveCustomSorts(config) | Retrieves all Custom Sorts that are active (not-suspended) in Adaptable State |
| getCustomSortById(id, config) | Retrieves Custom Sort by the technical ID (from CustomSortState) |
| getCustomSortByName(name) | Retrieves a Custom Sort by its Name |
| getCustomSortForColumn(columnId) | Retrieves Custom Sort from Adaptable State for Column with given ColumnId |
| getCustomSorts(config) | Retrieves all Custom Sorts in Adaptable State |
| getCustomSortState() | Retrieves Custom Sort section from Adaptable State |
| getLiveCustomSortComparers() | Returns all Custom Sort Comparers in Custom Sort Options that are currently applied |
| getLiveCustomSorts() | Retrieves all Custom Sorts in Adaptable State that are currently applied |
| getSuspendedCustomSorts(config) | Retrieves all Custom Sorts that are suspended in Adaptable State |
| openCustomSortSettingsPanel() | Opens Settings Panel with Custom Sort section selected and visible |
| suspendAllCustomSort() | Suspends all Custom Sorts |
| suspendCustomSort(customSort) | Suspends Custom Sort |
| unSuspendAllCustomSort() | Activates all suspended Custom Sort |
| unSuspendCustomSort(customSort) | Un-suspends or activates a suspended Custom Sort |
Method Details
addCustomSort
Adds a Custom Sort to Custom Sort collection in Adaptable State
addCustomSort(customSort: CustomSort): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| customSort | CustomSort | Custom Sort to add |
Returns
createCustomSort
Creates new Custom Sort based on given values
createCustomSort(params: {
name: string;
columnId: string;
values: string[];
}): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| params | \{ name: string; columnId: string; values: string[]; \} | Parameters for creating a Custom Sort |
Returns
deleteCustomSort
Removes Custom Sort for a given ColumnId
deleteCustomSort(columnId: string): void;Parameters
| Parameter | Type |
|---|---|
| columnId | string |
Returns
void
editCustomSort
Edits a Custom Sort
editCustomSort(customSort: CustomSort): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| customSort | CustomSort | Custom Sort to Edit |
Returns
editCustomSortValues
Updates existing Custom Sort with new set of Sorted Values
editCustomSortValues(columnId: string, values: string[]): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| columnId | string | Id of Column on which to edit the Custom Sort |
| values | string[] | Custom Sort values to use (replaces what was previously used) |
Returns
getActiveCustomSorts
Retrieves all Custom Sorts that are active (not-suspended) in Adaptable State
getActiveCustomSorts(config?: LayoutExtendedConfig): CustomSort[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getCustomSortById
Retrieves Custom Sort by the technical ID (from CustomSortState)
getCustomSortById(id: CustomSort['Uuid'], config?: LayoutExtendedConfig): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| id | CustomSort['Uuid'] | Custom Sort technical id |
| config | LayoutExtendedConfig |
Returns
getCustomSortByName
Retrieves a Custom Sort by its Name
getCustomSortByName(name: string): CustomSort | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | Name of the Custom Sort |
Returns
CustomSort | undefined
getCustomSortForColumn
Retrieves Custom Sort from Adaptable State for Column with given ColumnId
getCustomSortForColumn(columnId: string): CustomSort | undefined;Parameters
| Parameter | Type | Description |
|---|---|---|
| columnId | string | Id of Column to retrieve Custom Sort for |
Returns
CustomSort | undefined
getCustomSorts
Retrieves all Custom Sorts in Adaptable State
getCustomSorts(config?: LayoutExtendedConfig): CustomSort[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
getCustomSortState
Retrieves Custom Sort section from Adaptable State
getCustomSortState(): CustomSortState;Returns
getLiveCustomSortComparers
Returns all Custom Sort Comparers in Custom Sort Options that are currently applied
getLiveCustomSortComparers(): ColumnValuesComparer[];Returns
getLiveCustomSorts
Retrieves all Custom Sorts in Adaptable State that are currently applied
getLiveCustomSorts(): CustomSort[];Returns
getSuspendedCustomSorts
Retrieves all Custom Sorts that are suspended in Adaptable State
getSuspendedCustomSorts(config?: LayoutExtendedConfig): CustomSort[];Parameters
| Parameter | Type |
|---|---|
| config | LayoutExtendedConfig |
Returns
openCustomSortSettingsPanel
Opens Settings Panel with Custom Sort section selected and visible
openCustomSortSettingsPanel(): void;Returns
void
suspendAllCustomSort
Suspends all Custom Sorts
suspendAllCustomSort(): void;Returns
void
suspendCustomSort
Suspends Custom Sort
suspendCustomSort(customSort: CustomSort): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| customSort | CustomSort | Custom Sort to suspend |
Returns
unSuspendAllCustomSort
Activates all suspended Custom Sort
unSuspendAllCustomSort(): void;Returns
void
unSuspendCustomSort
Un-suspends or activates a suspended Custom Sort
unSuspendCustomSort(customSort: CustomSort): CustomSort;Parameters
| Parameter | Type | Description |
|---|---|---|
| customSort | CustomSort | Custom Sort to suspend |