Skip to content

Commit

Permalink
fix: always update height
Browse files Browse the repository at this point in the history
  • Loading branch information
wglanzer committed Oct 25, 2020
1 parent 7451060 commit c1685c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const Tree: React.FC<HyperTreeViewMainProps> = ({
const [height, setHeight] = React.useState<number>(staticNodeHeight || 0)

React.useEffect(() => {
if (nodeRef.current && !height && !staticNodeHeight) {
if (nodeRef.current && !staticNodeHeight) {
setHeight(nodeRef.current.clientHeight)
}

Expand Down

0 comments on commit c1685c5

Please sign in to comment.