Skip to content
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

FIX: location search debounce #79

Merged
merged 2 commits into from May 9, 2023
Merged

FIX: location search debounce #79

merged 2 commits into from May 9, 2023

Conversation

renato
Copy link
Contributor

@renato renato commented Apr 10, 2023

On the location-selector, self.get('settings.location_geocoding_debounce') was always undefined when calling geoLocationSearch, I'm not too familiar with Ember but adding @computed to settings fixed it.

Even with the proper value the debounce function wasn't working as expected, changing the way the request and callback args were passed to the locationSearch function also fixed it – I believe passing a new function every time makes it start a new debounce context for each call and not debounce at all.

@merefield
Copy link
Member

merefield commented May 8, 2023

Thanks @renato ... let me check something with @angusmcleod here because I think some of this code is legacy and should be removed.

@angusmcleod this line may be out of date now there have been architectural changes in CW, can you please confirm?:

return rootElement === '#custom-wizard-main' ? Wizard.SiteSettings : this.siteSettings;

should this simply be removed and we should always reference core siteSettings now?

@angusmcleod
Copy link
Member

@renato Thanks!

@angusmcleod angusmcleod merged commit 5358bf5 into paviliondev:main May 9, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants