From 85a91cfbce3f59b69149576b1db544a5ae111d71 Mon Sep 17 00:00:00 2001 From: kurokobo <2920259+kurokobo@users.noreply.github.com> Date: Sun, 15 Jun 2025 06:23:00 +0000 Subject: [PATCH] feat: make the autoFocus of VarReferenceVars optionally changeable --- .../nodes/_base/components/variable/var-reference-vars.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx index 9acbdf4ff7..27063a2ba3 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx +++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx @@ -260,6 +260,7 @@ type Props = { maxHeightClass?: string onClose?: () => void onBlur?: () => void + autoFocus?: boolean } const VarReferenceVars: FC = ({ hideSearch, @@ -271,6 +272,7 @@ const VarReferenceVars: FC = ({ maxHeightClass, onClose, onBlur, + autoFocus = true, }) => { const { t } = useTranslation() const [searchText, setSearchText] = useState('') @@ -323,7 +325,7 @@ const VarReferenceVars: FC = ({ onKeyDown={handleKeyDown} onClear={() => setSearchText('')} onBlur={onBlur} - autoFocus + autoFocus={autoFocus} />