mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-19 05:05:53 +08:00
fix: two scrollbar
This commit is contained in:
parent
a689cd6fd4
commit
ea40b1dcb2
@ -133,11 +133,10 @@ const ComponentPicker = ({
|
|||||||
// See https://github.com/facebook/lexical/blob/ac97dfa9e14a73ea2d6934ff566282d7f758e8bb/packages/lexical-react/src/shared/LexicalMenu.ts#L493
|
// See https://github.com/facebook/lexical/blob/ac97dfa9e14a73ea2d6934ff566282d7f758e8bb/packages/lexical-react/src/shared/LexicalMenu.ts#L493
|
||||||
<div className='w-0 h-0'>
|
<div className='w-0 h-0'>
|
||||||
<div
|
<div
|
||||||
className='p-1 w-[260px] bg-white rounded-lg border-[0.5px] border-gray-200 shadow-lg overflow-y-auto overflow-x-hidden'
|
className='p-1 w-[260px] bg-white rounded-lg border-[0.5px] border-gray-200 shadow-lg'
|
||||||
style={{
|
style={{
|
||||||
...floatingStyles,
|
...floatingStyles,
|
||||||
visibility: isPositioned ? 'visible' : 'hidden',
|
visibility: isPositioned ? 'visible' : 'hidden',
|
||||||
maxHeight: 'calc(1 / 3 * 100vh)',
|
|
||||||
}}
|
}}
|
||||||
ref={refs.setFloating}
|
ref={refs.setFloating}
|
||||||
>
|
>
|
||||||
@ -178,6 +177,7 @@ const ComponentPicker = ({
|
|||||||
onChange={(variables: string[]) => {
|
onChange={(variables: string[]) => {
|
||||||
handleSelectWorkflowVariable(variables)
|
handleSelectWorkflowVariable(variables)
|
||||||
}}
|
}}
|
||||||
|
maxHeightClass='max-h-[34vh]'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
@ -219,6 +219,7 @@ type Props = {
|
|||||||
vars: NodeOutPutVar[]
|
vars: NodeOutPutVar[]
|
||||||
onChange: (value: ValueSelector, item: Var) => void
|
onChange: (value: ValueSelector, item: Var) => void
|
||||||
itemWidth?: number
|
itemWidth?: number
|
||||||
|
maxHeightClass?: string
|
||||||
}
|
}
|
||||||
const VarReferenceVars: FC<Props> = ({
|
const VarReferenceVars: FC<Props> = ({
|
||||||
hideSearch,
|
hideSearch,
|
||||||
@ -226,6 +227,7 @@ const VarReferenceVars: FC<Props> = ({
|
|||||||
vars,
|
vars,
|
||||||
onChange,
|
onChange,
|
||||||
itemWidth,
|
itemWidth,
|
||||||
|
maxHeightClass,
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const [searchText, setSearchText] = useState('')
|
const [searchText, setSearchText] = useState('')
|
||||||
@ -279,7 +281,7 @@ const VarReferenceVars: FC<Props> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
{filteredVars.length > 0
|
{filteredVars.length > 0
|
||||||
? <div className='max-h-[85vh] overflow-y-auto'>
|
? <div className={cn('max-h-[85vh] overflow-y-auto', maxHeightClass)}>
|
||||||
|
|
||||||
{
|
{
|
||||||
filteredVars.map((item, i) => (
|
filteredVars.map((item, i) => (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user