diff --git a/components/createCreatableSelectComponent/createCreatableSelectChildrenComponent/index.tsx b/components/createCreatableSelectComponent/createCreatableSelectChildrenComponent/index.tsx index d83461de..033e202d 100644 --- a/components/createCreatableSelectComponent/createCreatableSelectChildrenComponent/index.tsx +++ b/components/createCreatableSelectComponent/createCreatableSelectChildrenComponent/index.tsx @@ -142,7 +142,7 @@ export const createCreatableSelectChildrenComponent = < const normalizedFilter = normalize(filter); const sortedOptions = [...options].sort(({ label: a }, { label: b }) => - a.localeCompare(b) + a.localeCompare(b, [], { numeric: true }) ); let filteredOptions; diff --git a/components/createOfflineTableComponent/index.tsx b/components/createOfflineTableComponent/index.tsx index f6206de1..a7568b05 100644 --- a/components/createOfflineTableComponent/index.tsx +++ b/components/createOfflineTableComponent/index.tsx @@ -382,7 +382,9 @@ export const createOfflineTableComponent = < } else if ((fromB as unknown as boolean) === false) { comparisonResult = 1; } else { - comparisonResult = String(fromA).localeCompare(String(fromB)); + comparisonResult = String(fromA).localeCompare(String(fromB), [], { + numeric: true, + }); } } diff --git a/components/createSearchableMultiSelectComponent/createSearchableMultiSelectChildrenComponent/index.tsx b/components/createSearchableMultiSelectComponent/createSearchableMultiSelectChildrenComponent/index.tsx index 0f71d1c2..6ba6d992 100644 --- a/components/createSearchableMultiSelectComponent/createSearchableMultiSelectChildrenComponent/index.tsx +++ b/components/createSearchableMultiSelectComponent/createSearchableMultiSelectChildrenComponent/index.tsx @@ -127,7 +127,7 @@ export const createSearchableMultiSelectChildrenComponent = < const normalizedFilter = normalize(filter); const sortedOptions = [...options].sort(({ label: a }, { label: b }) => - a.localeCompare(b) + a.localeCompare(b, [], { numeric: true }) ); let filteredOptions; diff --git a/components/createSearchableSelectComponent/createSearchableSelectChildrenComponent/index.tsx b/components/createSearchableSelectComponent/createSearchableSelectChildrenComponent/index.tsx index 35a53270..f083fd61 100644 --- a/components/createSearchableSelectComponent/createSearchableSelectChildrenComponent/index.tsx +++ b/components/createSearchableSelectComponent/createSearchableSelectChildrenComponent/index.tsx @@ -128,7 +128,7 @@ export const createSearchableSelectChildrenComponent = < const normalizedFilter = normalize(filter); const sortedOptions = [...options].sort(({ label: a }, { label: b }) => - a.localeCompare(b) + a.localeCompare(b, [], { numeric: true }) ); let filteredOptions;