googlemaps / googlemaps/extended-component-library

PlacePicker onPlaceChange does not work as expected

Open
#221 3 comments 1 reaction 0 assignees View on GitHub
type: bug
Dominant language
TypeScript
Stars
192
Forks
22
Avg merge
2d 23h
Merged PRs (30d)
8

Description

#### Environment details

- Framework: NextJS 14
- Language: TypeScript
- Library Version: @googlemaps/extended-component-library": "^0.6.11

I was following the library tutorial here - [link](https://configure.mapsplatform.google/place-picker) and copied the code, but it does not work as expected. For the `onPlaceChange` function, it does not have the "value" attribute. I am not sure how I can retrieve the `formattedAddress` value from the event. Any help is appreciated!
![image](https://github.com/googlemaps/extended-component-library/assets/47092704/2f872023-2486-400c-9db6-380560ae6a3d)
![image](https://github.com/googlemaps/extended-component-library/assets/47092704/c697590e-1483-4431-a840-fd3d687e9d28)

#### Steps to reproduce

1. Create a next js project.
2. Install @googlemaps/extended-component-library": "^0.6.11.
3. Create a component with the code below

#### Code example

```typescript
"use client";

import {
APILoader,
PlacePicker,
} from "@googlemaps/extended-component-library/react";

export default function MyPicker() {
return (



{
// e.target. // This line does not work as expected
}}
/>

);
}
```

#### Stack trace
N.A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.