You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As other dropdowns will not be openend the setContent(undefined) will be called and suggestion list will be hidden from the view.
The easiest fix I have found was to add check to mentioned useEffect :
constclose=()=>{setIsOpened(false)setDirection(props.direction)setContent(undefined)activeInputRef.current=null<--resetactiveref}useEffect(()=>{// check if active ref is the correct oneif(activeInputRef.current&&activeInputRef.current!==containerRef.current){return;}if(isOpened&&Array.isArray(dataSet)){if(activeInputRef){activeInputRef.current=containerRef.current}
with this check useEffect will not be called for not active input.
Can you please look into this, please?
The text was updated successfully, but these errors were encountered:
@lorenc-tomasz all previous changes, change on node_modules/react-native-autocomplete-dropdown then run command "yarn patch-package react-native-autocomplete-dropdown" that can be work for me
I have the same problem and need to use 5 Dropdowns in the same view. When searching in autocomplete the application becomes extremely slow and the list appears for a few seconds and then disappears. @lorenc-tomasz able to find any solution?
Hi,
I have noticed issue with multiple dropdown when at least one of have
onChangeText
implemented and it changes parent's state.onChangeText
that will set state e.g.useEffect
will be called for each dropdown:As other dropdowns will not be openend the
setContent(undefined)
will be called and suggestion list will be hidden from the view.The easiest fix I have found was to add check to mentioned
useEffect
:with this check
useEffect
will not be called for not active input.Can you please look into this, please?
The text was updated successfully, but these errors were encountered: