@carbon/react
Version:
React components for the Carbon Design System
17 lines (16 loc) • 626 B
TypeScript
/**
* Copyright IBM Corp. 2016, 2026
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import type { CompareItems, SortItemsOptions } from '../MultiSelectPropTypes';
/**
* Use `localeCompare` with the `numeric` option enabled to sort two
* alphanumeric strings.
*/
export declare const defaultCompareItems: CompareItems;
/**
* Default sorting function for options in a selection control.
*/
export declare const defaultSortItems: <T>(items: T[], { selectedItems, itemToString, compareItems, locale }: SortItemsOptions<T>) => T[];