Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1348 | Collection form | fixing autoexpand …
Browse files Browse the repository at this point in the history
…HEAD state
  • Loading branch information
snyaggarwal committed Sep 5, 2022
1 parent 7f18ed4 commit 107531d
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -11,11 +11,11 @@ const Expansions = props => {
const [autoexpandHEAD, setAutoexpandHEAD] = React.useState(true)
const onChange = value => {
setAutoexpandHEAD(value)
props.onChange({autoexpandHEAD: value})
props.onChange({autoexpand_head: value})
}
const defaultExpanded = props.edit && !props.repo.autoexpandHEAD
const defaultExpanded = props.edit && !props.repo.autoexpand_head

React.useEffect(() => props.edit && setAutoexpandHEAD(props.repo.autoexpandHEAD || false), [])
React.useEffect(() => props.edit && setAutoexpandHEAD(props.repo.autoexpand_head || false), [])

return (
<CommonAccordion square title={configs.title} subTitle={configs.subTitle} defaultExpanded={defaultExpanded}>
Expand Down

0 comments on commit 107531d

Please sign in to comment.