From ea40b1dcb2110653acbdc9ed28f0bd9de9427317 Mon Sep 17 00:00:00 2001 From: Joel Date: Tue, 10 Sep 2024 15:05:54 +0800 Subject: [PATCH] fix: two scrollbar --- .../prompt-editor/plugins/component-picker-block/index.tsx | 4 ++-- .../nodes/_base/components/variable/var-reference-vars.tsx | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx b/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx index 15b07ded17..0cadf9f95f 100644 --- a/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx +++ b/web/app/components/base/prompt-editor/plugins/component-picker-block/index.tsx @@ -133,11 +133,10 @@ const ComponentPicker = ({ // See https://github.com/facebook/lexical/blob/ac97dfa9e14a73ea2d6934ff566282d7f758e8bb/packages/lexical-react/src/shared/LexicalMenu.ts#L493
@@ -178,6 +177,7 @@ const ComponentPicker = ({ onChange={(variables: string[]) => { handleSelectWorkflowVariable(variables) }} + maxHeightClass='max-h-[34vh]' />
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 2f2371ce52..ab71c959d5 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 @@ -219,6 +219,7 @@ type Props = { vars: NodeOutPutVar[] onChange: (value: ValueSelector, item: Var) => void itemWidth?: number + maxHeightClass?: string } const VarReferenceVars: FC = ({ hideSearch, @@ -226,6 +227,7 @@ const VarReferenceVars: FC = ({ vars, onChange, itemWidth, + maxHeightClass, }) => { const { t } = useTranslation() const [searchText, setSearchText] = useState('') @@ -279,7 +281,7 @@ const VarReferenceVars: FC = ({ } {filteredVars.length > 0 - ?
+ ?
{ filteredVars.map((item, i) => (