extended-component-library icon indicating copy to clipboard operation
extended-component-library copied to clipboard

How to prepopulate the text box?

Open avi12 opened this issue 1 year ago • 5 comments

In my scenario, I load <gmpx-place-picker> inside a sandbox page inside an iframe inside a Chrome extension content script After the user selects a location, he will close the pop-up injected into the content script How do I make sure that the next time he loads up, <gmpx-place-picker> is prepopulated with the value he selected earlier?

avi12 avatar Jul 30 '24 21:07 avi12

Good question, there isn't a way to do this right now. Are you looking to pre-populate the text box purely for display purposes? Or would you need to pre-populate placePicker.value (i.e. the Place instance) as well?

awmack avatar Aug 15 '24 16:08 awmack

For display purposes, yes

avi12 avatar Aug 15 '24 16:08 avi12

For data consistency I would love to be able to set placePicker.value and have the form widget prefilled with the place details

dorsma avatar Feb 10 '25 15:02 dorsma

+1 for this. I'm currently working around this limitation by setting the placeholder to the formatted_address to give the user some feedback about a previously selected location.

aerni avatar Jul 23 '25 16:07 aerni

Has anyone found a workaround?

naquiroz avatar Nov 03 '25 14:11 naquiroz