mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
fix(web): memoize skill sidebar menu offset
This commit is contained in:
@ -65,6 +65,7 @@ const SidebarSearchAdd: FC = () => {
|
||||
return 'root'
|
||||
return getTargetFolderIdFromSelection(activeTabId, treeData.children)
|
||||
}, [activeTabId, treeData?.children])
|
||||
const menuOffset = useMemo(() => ({ mainAxis: 4 }), [])
|
||||
|
||||
const {
|
||||
fileInputRef,
|
||||
@ -91,7 +92,7 @@ const SidebarSearchAdd: FC = () => {
|
||||
open={showMenu}
|
||||
onOpenChange={setShowMenu}
|
||||
placement="bottom-end"
|
||||
offset={{ mainAxis: 4 }}
|
||||
offset={menuOffset}
|
||||
>
|
||||
<PortalToFollowElemTrigger onClick={() => setShowMenu(!showMenu)}>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user