Skip to content

Comments

Fix autocompleteSearchDebounce param leaking into Places API request#76

Open
aghayeff wants to merge 1 commit intoTappNetwork:4.xfrom
aghayeff:fix-autocompleteSearchDebounce-param
Open

Fix autocompleteSearchDebounce param leaking into Places API request#76
aghayeff wants to merge 1 commit intoTappNetwork:4.xfrom
aghayeff:fix-autocompleteSearchDebounce-param

Conversation

@aghayeff
Copy link

Summary

  • autocompleteSearchDebounce was being included in the API request params sent to Google Places API, causing the request to fail with "Unknown field" error
  • Added unset($this->params['autocompleteSearchDebounce']) in getPlaceAutocomplete() to strip this Filament-only parameter before sending the request to Google
  • Similar to the existing unset($this->params['autocompleteFieldColumnSpan']) fix on the line above

Root Cause

The autocompleteSearchDebounce() method stores its value in $this->params (used internally for Filament's Select search debounce), but $this->params is also passed directly to the Google Places API call. Google doesn't recognize autocompleteSearchDebounce as a valid field and returns an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant