From 9a2f42c823622bb6c13753f36a413d46f91dd4c5 Mon Sep 17 00:00:00 2001 From: Rune Nielsen Date: Mon, 5 Aug 2024 14:59:06 +0200 Subject: [PATCH] make it easier to add terminal equipment, sorting fields and enable search (#540) --- .../AddTerminalEquipment/AddTerminalEquipment.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/groups/RouteNetworkDiagram/AddTerminalEquipment/AddTerminalEquipment.tsx b/src/groups/RouteNetworkDiagram/AddTerminalEquipment/AddTerminalEquipment.tsx index 3ba877f7..795ffe91 100644 --- a/src/groups/RouteNetworkDiagram/AddTerminalEquipment/AddTerminalEquipment.tsx +++ b/src/groups/RouteNetworkDiagram/AddTerminalEquipment/AddTerminalEquipment.tsx @@ -230,7 +230,7 @@ function AddTerminalEquipment({ specificationResponse.data.utilityNetwork.terminalEquipmentSpecifications, state.category, !!rackId, - ); + ).sort((x, y) => x.text.localeCompare(y.text)); }, [ specificationResponse.data?.utilityNetwork.terminalEquipmentSpecifications, state.category, @@ -253,7 +253,7 @@ function AddTerminalEquipment({ (x) => x.id === state.specification, )?.manufacturerRefs ?? [], ), - ]; + ].sort((x, y) => x.text.localeCompare(y.text)); }, [state.specification, specificationResponse, t]); const accessAddresses = useMemo(() => { @@ -415,6 +415,7 @@ function AddTerminalEquipment({