n4kz / react-native-material-dropdown

Material dropdown with consistent behaviour on iOS and Android
Other
732 stars 597 forks source link

Is it possible to use the dropdown with a TextInput #61

Closed EyMaddis closed 6 years ago

EyMaddis commented 6 years ago

Hi, I would love to use this, but not as selection dropdowns but an autocompletion dropdown. The input is also the react-native-material-textfield. I tried setting the input as the base, but the ripple overlays the button. Instead I am currently calling dropdown.focus() on a dropdown with a hidden base element, however this blurs the input.

It seems that this is due to the Modal opening.

Are there ways to avoid this and can just the dropdown view be extracted from the module?

n4kz commented 6 years ago

Thanks for question and sorry for delayed reply. Extracting dropdown view to a some reusable form from its current state can be a long way because it's tightly bound with Modal component and dropdown position calculations. I'm working on additional customisation options and overall code maintainability but can not promise anything about autocompletion right now. Probably autocompletion should be done in a fork without backward compatibility with this component to simplify its logic.

If however some minor improvements can be made to make Dropdown usable in your case - feel free to open new issue or continue with this one.