Skip to content

feat(popup): add max height and scroll #875

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/input-autocomplete/input-autocomplete.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class InputAutocomplete extends React.Component {
onClickOutside={ this.handleClickOutside }
target='anchor'
directions={ this.props.directions }
height='adaptive'
height={ this.props.popupMaxHeight ? 'default' : 'adaptive' }
padded={ false }
minWidth={ this.state.popupStyles.minWidth }
maxWidth={ this.state.popupStyles.maxWidth }
Expand Down
4 changes: 4 additions & 0 deletions src/popup/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@
transform: translateZ(0);
}
}

&_overflow {
overflow-y: scroll;
}
}

.popup_type_tooltip {
Expand Down
3 changes: 2 additions & 1 deletion src/popup/popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ class Popup extends React.Component {
size: this.props.size,
visible: this.props.visible,
height: this.props.height,
padded: this.props.padded
padded: this.props.padded,
overflow: !!this.props.maxHeight
}) }
id={ this.props.id }
style={ {
Expand Down