update expanding container to trigger height check when any child changes

This commit is contained in:
John Mitchell
2020-02-21 10:50:13 -05:00
parent df13a8fea9
commit ce909093c0
@@ -19,7 +19,7 @@ function ExpandingContainer({ isExpanded, children }) {
});
useEffect(() => {
setContentHeight(ref.current.scrollHeight);
}, [setContentHeight]);
}, [setContentHeight, children]);
const height = isExpanded ? contentHeight : '0';
return (
<Container