Skip to content

Commit

Permalink
make it easier to add terminal equipment, sorting fields and enable s…
Browse files Browse the repository at this point in the history
…earch (#540)
  • Loading branch information
runeanielsen authored Aug 5, 2024
1 parent 27b1a00 commit 9a2f42c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<SelectOption[]>(() => {
Expand Down Expand Up @@ -415,6 +415,7 @@ function AddTerminalEquipment({
<div className="full-row">
<LabelContainer text={`${t("SPECIFICATION")}:`}>
<SelectMenu
enableSearch
autoSelectFirst={true}
options={specificationOptions}
removePlaceHolderOnSelect
Expand Down

0 comments on commit 9a2f42c

Please sign in to comment.