Skip to content

How to perform a logic on completion of the useAutoComplete ? #4214

Discussion options

You must be logged in to vote

Are you only using serviceDetailAutocompleteProps.options inside the useEffect? Have you tried adding only serviceDetailAutocompleteProps.options to the dependency array to see if it solves the issue?

    useEffect(() => {
        const currentServiceDetailIds = questionsData?.serviceDetails;
        if (!currentServiceDetailIds || currentServiceDetailIds.length == 0) {
            return;
        }
        const currentServiceDetail =
            serviceDetailAutocompleteProps.options?.find((serviceDetail) => {
                return serviceDetail.id == currentServiceDetailIds[0];
            });
        if (!currentServiceDetail) {
            return;
        }
        const currentService

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by omeraplak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants