fateh999 / react-native-paper-form-builder

React Native Paper Form Builder with inbuilt Validation, dropdown, autocomplete, checkbox, switch and radio inputs.
MIT License
116 stars 25 forks source link

Autocomplete unselect #52

Open rkostrab opened 2 years ago

rkostrab commented 2 years ago

Hi, how to achieve unselect operation in autocomplete? I've already tried to implement custom autocomplete where I am callingfield.onChange(null) which sets form-value correctly but the textinput value keeps showing the unchanged label from options.

Edit 1: Tried also field.ref.current.clear() from custom autocomplete component but getting undefined function error

Edit 2: field.ref.clear() seems to work but this method just makes the InputText empty without any placeholder and it keeps stuck in this state - I mean picking up another option does not change value in TextInput.

Thank you