diff --git a/src/components/visual/ResultCard/result_section.tsx b/src/components/visual/ResultCard/result_section.tsx index 0c23c8d30..1ce6b40a7 100644 --- a/src/components/visual/ResultCard/result_section.tsx +++ b/src/components/visual/ResultCard/result_section.tsx @@ -427,6 +427,7 @@ export type SectionItem = { }; export type Section = { + auto_collapse: boolean; body: any; body_format: string; classification: string; @@ -474,7 +475,7 @@ const ResultSection: React.FC = ({ const classes = useStyles(); const theme = useTheme(); const section = section_list[id]; - const [open, setOpen] = React.useState(true); + const [open, setOpen] = React.useState(!section.auto_collapse); const { getKey, hasHighlightedKeys } = useHighlighter(); const { c12nDef } = useALContext();