Skip to content

Commit

Permalink
Refactor PlaceAutocomplete component, enhance accessibility attribute…
Browse files Browse the repository at this point in the history
…s, and update README; modify .gitignore and package dependencies
  • Loading branch information
alexpechkarev committed Nov 30, 2024
1 parent aad52d9 commit 7bc5089
Show file tree
Hide file tree
Showing 6 changed files with 568 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Thumbs.db
vite.config.js.timestamp-*
vite.config.ts.timestamp-*


package-lock.json
api_key.txt
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ const fetchFields = ['formattedAddress', 'addressComponents'];
{onError}
{onResponse}
{PUBLIC_GOOGLE_MAPS_API_KEY}
bind:countries
{requestParams}
{placeholder}
{autocompete}
{fetchFields}/>
{fetchFields}
bind:countries
/>
```

Expand All @@ -144,13 +146,13 @@ The `onError` event will be dispatched if there is an issue with the Google Maps

```svelte
<script>
// ... other imports
// ... other imports
// Error handler
let pacError = '';
let onError = (error: string) => {
console.error(error);
pacError = error;
// Error handler
let pacError = '';
let onError = (error: string) => {
console.error(error);
pacError = error;
};
</script>
Expand Down
Loading

0 comments on commit 7bc5089

Please sign in to comment.