1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 13:55:31 +03:00

update expanding container to trigger height check when any child changes

This commit is contained in:
John Mitchell 2020-02-18 14:36:18 -05:00
parent df13a8fea9
commit ce909093c0

View File

@ -19,7 +19,7 @@ function ExpandingContainer({ isExpanded, children }) {
});
useEffect(() => {
setContentHeight(ref.current.scrollHeight);
}, [setContentHeight]);
}, [setContentHeight, children]);
const height = isExpanded ? contentHeight : '0';
return (
<Container