Skip to content

Commit

Permalink
Wire set geocomplete field after place selection to prevent entry bei…
Browse files Browse the repository at this point in the history
…ng lost if mouse is used to select (blur event when clicking Google menu confuses Livewire)
  • Loading branch information
cheesegrits committed Apr 4, 2023
1 parent 7f305e1 commit 4b75fac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 177 deletions.
177 changes: 2 additions & 175 deletions dist/cheesegrits/filament-google-maps/filament-google-maps.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/cheesegrits/filament-google-maps/filament-google-maps.js": "/cheesegrits/filament-google-maps/filament-google-maps.js?id=8a9b6378d875f830ba605d77b59acfad",
"/cheesegrits/filament-google-maps/filament-google-maps.js": "/cheesegrits/filament-google-maps/filament-google-maps.js?id=cc2ac039caa4728eb43bdacb965a3bc0",
"/cheesegrits/filament-google-maps/filament-google-geocomplete.js": "/cheesegrits/filament-google-maps/filament-google-geocomplete.js?id=a826e35a004b69e88001c15a73beb7ff",
"/cheesegrits/filament-google-maps/filament-google-maps-widget.js": "/cheesegrits/filament-google-maps/filament-google-maps-widget.js?id=8e02bcc3df759a56b1991e369850ef77",
"/cheesegrits/filament-google-maps/filament-google-maps.css": "/cheesegrits/filament-google-maps/filament-google-maps.css?id=30b2a3cea943a7c83bb3b1c8ff50a762"
Expand Down
1 change: 1 addition & 0 deletions resources/js/filament-google-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ window.filamentGoogleMaps = ($wire, config) => {
this.map.setCenter(place.geometry.location);
}

$wire.set(this.config.autocomplete, place.formatted_address);
this.marker.setPosition(place.geometry.location);
this.markerLocation = place.geometry.location;
this.setCoordinates(place.geometry.location);
Expand Down

0 comments on commit 4b75fac

Please sign in to comment.