fix: sorting on advanced modal parameters (#2730)

Added sorting in advanced values
This commit is contained in:
Lucas Oliveira 2024-07-16 14:27:21 -03:00 committed by GitHub
commit 3d02075170
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
import sortFields from "@/CustomNodes/utils/sort-fields";
import { useMemo } from "react";
import { LANGFLOW_SUPPORTED_TYPES } from "../../../constants/constants";
import { APIClassType } from "../../../types/api";
import { NodeDataType } from "../../../types/flow";
@ -21,6 +21,7 @@ const useRowData = (
)
);
})
.sort((a, b) => sortFields(a, b, myData.node?.field_order ?? []))
.map((key: string) => {
const templateParam = myData.node!.template[key] as any;
return {