fateh999/react-native-paper-form-builder

Autocomplete onChange or onSelect

Closed this issue · 2 comments

Hi all,
I have 3 element of form.
The first element is autocomplete. When I select one element of autocomplete, I need to call a POST request for get data can will put in 2nd and 3th elements.
How I can execute this functions? Do you have a call onSelect or onChange?
My autocomplete fields is named prest.
I have try with this code:
useEffect(()=> { console.log(form.watch('prest')); },[]);
but it can't show the difference when I select different elements.

For this, you can use
useEffect(()=>{ //Api call },[form.watch('keyname')])

There is no onSelect in this library

Nice,
it works fine!
Thanks!!!