fix(parameterComponent/index.tsx): remove unnecessary ts-ignore comments

fix(reactflowUtils.ts): add input_types variable to prevent error when checking for advanced types
This commit is contained in:
anovazzi1 2023-09-12 17:17:36 -03:00
commit 42f7821002
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,6 @@ export default function ParameterComponent({
let groupedObj = groupByFamily(myData, tooltipTitle!, left, flow!); let groupedObj = groupByFamily(myData, tooltipTitle!, left, flow!);
if (groupedObj && groupedObj.length > 0) { if (groupedObj && groupedObj.length > 0) {
//@ts-ignore
//@ts-ignore //@ts-ignore
refHtml.current = groupedObj.map((item, index) => { refHtml.current = groupedObj.map((item, index) => {
const Icon: any = const Icon: any =

View file

@ -523,6 +523,7 @@ function updateGroupNodeTemplate(template: APITemplateType) {
updating the visibility of all basic types setting it to advanced true*/ updating the visibility of all basic types setting it to advanced true*/
Object.keys(template).forEach((key) => { Object.keys(template).forEach((key) => {
let type = template[key].type; let type = template[key].type;
let input_types = template[key].input_types;
if ( if (
(type === "str" || (type === "str" ||
type === "bool" || type === "bool" ||
@ -531,7 +532,7 @@ function updateGroupNodeTemplate(template: APITemplateType) {
type === "prompt" || type === "prompt" ||
type === "file" || type === "file" ||
type === "int") && type === "int") &&
!template[key].required !template[key].required && !input_types
) { ) {
template[key].advanced = true; template[key].advanced = true;
} }