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
I would like to integrate the search API into the tagPicker to fetch tags and then resolve the suggestions. However, with the current behavior of the tagPicker, I am unable to implement this as resolveSuggestions is triggered only on user input. I also want to display a loader when the API is in progress. Adding the search API in onResolveSuggestions results in repeated API calls on input change.
for every input trigger it is making the api call which we don't want. If we need to call api for every 2 letter input if we add condition for that then if user directly enters 3 letter word we are seeing infinite loading.
for every input trigger it is making the api call which we don't want. If we need to call api for every 2 letter input if we add condition for that then if user directly enters 3 letter word we are seeing infinite loading.
I don't see any bug or issue on the component side. The component behaves as expected, providing a function that retrieves suggestions asynchronously after the input value changes. In your example, the infinite render happens because of the side effect (setState) inside onResolveSuggestions. Without it, everything works fine.
Package
@fluentui/react
Package version
8.109
React version
18.2.0
Environment
Current Behavior
I would like to integrate the search API into the tagPicker to fetch tags and then resolve the suggestions. However, with the current behavior of the tagPicker, I am unable to implement this as resolveSuggestions is triggered only on user input. I also want to display a loader when the API is in progress. Adding the search API in onResolveSuggestions results in repeated API calls on input change.
Could you please suggest if there is a way to achieve this behaviour?
Expected Behavior
need a way to update suggestionList based on api call response
Reproduction
Steps to reproduce
Are you reporting an Accessibility issue?
None
Suggested severity
Urgent - No workaround and Products/sites are affected
Products/sites affected
No response
Are you willing to submit a PR to fix?
yes
Validations
The text was updated successfully, but these errors were encountered: