-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search Results Not closing, and marker not dropping #101
Comments
@SamSamskies can you help me please? |
Hi @MuhammadJafarFA17BCS054, you are already memoizing the |
Hi @SamSamskies , Thankyou for helping me out, but as i said in the start, I am a newbie, i read the article but i still cant figure out how to memoize the function that i am passing to filter prop. Can you help me? |
#39 (comment) |
You can use the Thanks for pointing out the issue with the broken sandbox. I fixed it. |
Thank You so much @SamSamskies , i got the basic idea what useCallBack do and what memoized functions are. What i am stuck on now is that, how do i call multiple functions (each made using a useCallBack hook) on onResult prop of Geocoder? |
You can wrap both of the functions with another function. const sayHello = () => console.log("hello");
const sayWorld = () => console.log("world");
const sayHelloWorld = useCallback(() => {
sayHello();
sayWorld();
}, []); |
@MuhammadJafarFA17BCS054 - Were you able to resolve your issue. It seems I am having the same issue but for onResult prop. |
Hi there,
I am having an issue with react-map-gl-geocoder. When i use "filter" prop to filter the search results, the geocoder's default marker doesnt drop on selected location, also the menu with search results doesnt collaps, it reopens.
I know you are going to ask me to memoize my handleViewPortChange function, the thing is I am new to react and i dont know how to do that. Can somebody please help me? Attaching the screenshot of my source code.
The text was updated successfully, but these errors were encountered: