Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash app #39

Open
hungdev opened this issue Aug 10, 2021 · 1 comment
Open

Crash app #39

hungdev opened this issue Aug 10, 2021 · 1 comment

Comments

@hungdev
Copy link
Contributor

hungdev commented Aug 10, 2021

If we dont pass height into dropdownStyle , and the dropdown doesn't show in bottom then it will crash because
Math.max(0, this._buttonFrame.y - dropdownHeight) and dropdownHeight = "auto" then top position is Math.max(0, this._buttonFrame.y - "auto") = NaN. The app will crash.
temporary solution is remove dropdownHeight from this line: https://github.com/siemiatj/react-native-modal-dropdown/blob/master/components/ModalDropdown.js#L335

@zxar7
Copy link

zxar7 commented Aug 12, 2021

I faced this issue when I had 3 dropdowns and I tried opening the 3rd one. I had set the height in dropdownStyle to auto. It looked the the height was set to some minimum that was not based on the number of options I was sending in.
I was able to overcome this by specifying the height by multiplying my minHeight with the number of options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants