Merge branch 'dev' of https://gitlab.com/kluppsoftware/smart-energia-web into dev
This commit is contained in:
commit
bc2aaf180e
@ -17,9 +17,9 @@ export function sortedString<T = any>(field: string = "", optionsSorts: Intl.Col
|
|||||||
if (!field) return Intl.Collator(locale, optionsSorts).compare;
|
if (!field) return Intl.Collator(locale, optionsSorts).compare;
|
||||||
|
|
||||||
return (a: T, b: T): number =>
|
return (a: T, b: T): number =>
|
||||||
(a[field as keyof T] as string)?.localeCompare(
|
(a[field as keyof T] as unknown as string)?.localeCompare(
|
||||||
(b[field as keyof T] as string) ?? "",
|
(b[field as keyof T] as unknown as string) ?? '',
|
||||||
locale,
|
locale,
|
||||||
optionsSorts
|
optionsSorts
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user