fix(striker-ui): sort fence parameters before display

main
Tsu-ba-me 2 years ago
parent 645fd3f0d6
commit dfecf7ba08
  1. 7
      striker-ui/components/CommonFenceInputGroup.tsx

@ -69,7 +69,9 @@ const CommonFenceInputGroup: FC<CommonFenceInputGroupProps> = ({
}
const { optional: optionalInputs, required: requiredInputs } =
Object.entries(fenceParameters).reduce<{
Object.entries(fenceParameters)
.sort(([a], [b]) => (a > b ? 1 : -1))
.reduce<{
optional: ReactElement[];
required: ReactElement[];
}>(
@ -87,7 +89,8 @@ const CommonFenceInputGroup: FC<CommonFenceInputGroupProps> = ({
) => {
const { optional, required } = previous;
const buildInput =
MAP_TO_INPUT_BUILDER[contentType] ?? MAP_TO_INPUT_BUILDER.string;
MAP_TO_INPUT_BUILDER[contentType] ??
MAP_TO_INPUT_BUILDER.string;
const fenceJoinParameterId = combineIds(fenceId, parameterId);
const initialValue =

Loading…
Cancel
Save