Merge pull request #27690 from matdtr/feature/entitytypePicker_sort

Added sorted prop to EntityTypePicker
This commit is contained in:
Fredrik Adelöw
2024-12-17 09:28:33 +01:00
committed by GitHub
2 changed files with 9 additions and 0 deletions
@@ -55,6 +55,10 @@ export const EntityTypePicker = (props: EntityTypePickerProps) => {
if (availableTypes.length === 0 || error) return null;
availableTypes.sort((a, b) =>
a.toLocaleLowerCase('en-US').localeCompare(b.toLocaleLowerCase('en-US')),
);
const items = [
{ value: 'all', label: t('entityTypePicker.optionAllTitle') },
...availableTypes.map((type: string) => ({