mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-10 01:11:23 +08:00
Feat: Move less important chat settings into a collapsible panel. (#16024)
### What problem does this PR solve? Feat: Move less important chat settings into a collapsible panel. ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@@ -29,7 +29,7 @@ export function Collapse({
|
||||
title,
|
||||
children,
|
||||
rightContent,
|
||||
open = true,
|
||||
open,
|
||||
defaultOpen = false,
|
||||
onOpenChange,
|
||||
disabled,
|
||||
@@ -37,8 +37,12 @@ export function Collapse({
|
||||
const [currentOpen, setCurrentOpen] = useState(open);
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentOpen(open);
|
||||
}, [open]);
|
||||
if (typeof open === 'boolean') {
|
||||
setCurrentOpen(open);
|
||||
} else {
|
||||
setCurrentOpen(defaultOpen);
|
||||
}
|
||||
}, [defaultOpen, open]);
|
||||
|
||||
const handleOpenChange = useCallback(
|
||||
(open: boolean) => {
|
||||
|
||||
Reference in New Issue
Block a user