Skip to content

Commit

Permalink
fix dropdown loading
Browse files Browse the repository at this point in the history
  • Loading branch information
diStyApps committed Dec 21, 2024
1 parent 501b04d commit 9f30c36
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
3 changes: 2 additions & 1 deletion flow/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path
import re
APP_NAME = "Flow"
APP_VERSION = "0.4.8"
APP_VERSION = "0.4.9"
FLOWMSG = f"\033[38;5;129mFlow - {APP_VERSION}\033[0m"
APP_CONFIGS = []

Expand Down Expand Up @@ -58,6 +58,7 @@
"afl_pulid_flux_GGUF",
"afl_reactor"
"5otvy-cogvideox-orbit-left-lora",
"umbi9-hunyuan-text-to-video"
]

NODE_CLASS_MAPPINGS = {}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "comfyui-disty-flow"
description = "Flow is a custom node designed to provide a more user-friendly interface for ComfyUI by acting as an alternative user interface for running workflows. It is not a replacement for workflow creation.\nFlow is currently in the early stages of development, so expect bugs and ongoing feature enhancements. With your support and feedback, Flow will settle into a steady stream."
version = "0.4.8"
version = "0.4.9"
license = {file = "LICENSE"}

[project.urls]
Expand Down
25 changes: 21 additions & 4 deletions web/core/js/common/components/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,31 @@ export default class Dropdown {
}

populate(data) {
const loaderData = data[Object.keys(data)[0]];
if (!loaderData.input.required[this.config.key]) {
const firstKey = Object.keys(data)[0];
const loaderData = data[firstKey];

let inputData = loaderData.input.required[this.config.key];

if (!inputData) {
console.warn(`Required input for key "${this.config.key}" is missing. Checking for optional input.`);
inputData = loaderData.input.optional ? loaderData.input.optional[this.config.key] : undefined;
}

if (!inputData) {
this.displayMissingComponentMessage();
return;
}
populateDropdown(this.config.id, loaderData.input.required[this.config.key][0], this.config.label, this.config.nodePath, this.workflow);
populateDropdown(
this.config.id,
inputData[0],
this.config.label,
this.config.nodePath,
this.workflow
);
}




displayMissingComponentMessage() {
if (this.loaderContainer) {
this.loaderContainer.innerHTML = '';
Expand Down

0 comments on commit 9f30c36

Please sign in to comment.