diff --git a/src/backend/base/langflow/custom/custom_component/component.py b/src/backend/base/langflow/custom/custom_component/component.py index c780a8931..13b9623b5 100644 --- a/src/backend/base/langflow/custom/custom_component/component.py +++ b/src/backend/base/langflow/custom/custom_component/component.py @@ -1166,7 +1166,7 @@ class Component(CustomComponent): { "name": tool.name, "description": tool.description, - "tags": tool.tags, + "tags": tool.tags if hasattr(tool, "tags") and tool.tags else [tool.name], "status": True, # Initialize all tools with status True } for tool in tools diff --git a/src/frontend/src/components/core/dropdownComponent/index.tsx b/src/frontend/src/components/core/dropdownComponent/index.tsx index eed5ba29a..d0c4550f5 100644 --- a/src/frontend/src/components/core/dropdownComponent/index.tsx +++ b/src/frontend/src/components/core/dropdownComponent/index.tsx @@ -62,6 +62,12 @@ export default function Dropdown({ const [refreshOptions, setRefreshOptions] = useState(false); const refButton = useRef(null); + value = useMemo(() => { + if (!options.includes(value)) { + return null; + } + return value; + }, [value, options]); // Initialize utilities and constants const placeholderName = name ? formatPlaceholderName(name)