The element shows me the list of items without problems.
The problem is when you get the information of the selected item, when you click on the item, the value of the locationItem variable is null, the result is shown until you click on the same item.
That is, you have to double click on the item to show the result.
I'm using an observer in the variable locationItem
static get observers() {
return [
'processLocationSelection(locationItem)',
]
}
And the function looks like this
processLocationSelection(locationItem) {
console.log(locationItem); //is null in the first click
if (locationItem) {
console.log(locationItem); // has value in the second click
}
}
I am using the element as follows:
`
`
The element shows me the list of items without problems. The problem is when you get the information of the selected item, when you click on the item, the value of the
locationItem
variable is null, the result is shown until you click on the same item. That is, you have to double click on the item to show the result.I'm using an observer in the variable
locationItem
And the function looks like this