Skip to content
Open
Changes from 2 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
8 changes: 6 additions & 2 deletions components/ModalDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,12 @@ export default class ModalDropdown extends Component {
const windowWidth = dimensions.width;
const windowHeight = dimensions.height;

const dropdownHeight = (this.props.dropdownStyle && StyleSheet.flatten(this.props.dropdownStyle).height) ||
StyleSheet.flatten(styles.dropdown).height;
const dropdownHeight = (this.props.dropdownStyle && StyleSheet.flatten(this.props.dropdownStyle).height);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't you change const to let? You changed the dropdownHeight in the following lines.

if (dropdownHeight == "auto") {
let itemHeight = (this.props.style && StyleSheet.flatten(this.props.style).height) ||
StyleSheet.flatten(styles.dropdown).height;
dropdownHeight = itemHeight * this.props.options.length;
}

const bottomSpace = windowHeight - this._buttonFrame.y - this._buttonFrame.h;
const rightSpace = windowWidth - this._buttonFrame.x;
Expand Down