Skip to content

Commit

Permalink
prevent from growing indefinitelty
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Apr 2, 2020
1 parent d469bcf commit 31dad98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/ui/lib/list/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ export class List extends React.Component<IListProps, IListState> {
const [width, height] = [target.offsetWidth, target.offsetHeight]

if (this.state.width !== width || this.state.height !== height) {
this.setState({ width, height })
this.setState({
width,
height: Math.min(height, window.outerHeight - 250 - 90),
})
}
}

Expand Down

0 comments on commit 31dad98

Please sign in to comment.