Wappler Version : 5.4.3
Operating System : W11
Server Model: Node
Database Type: Mysql
Hosting Type:Docker
Autocomplete jumps to a different (last?) value when the name is the same.
See:
2023.03.09 13.28 - 6070 - Bronco
To reproduce:
- Create a db query where you get an array of objects where the
name
equals
This is what I get from the DB:
{
"query": [
{
"id": 1,
"name": "user 1",
"email": "email A"
},
{
"id": 2,
"name": "user 1",
"email": "email B"
}
]
}
- Create an autocomplete on the page, set up like so:
<input id="autocomplete1" name="autocomplete1" is="dmx-autocomplete" dmx-bind:data="get_users.data.query" optiontext="name" optionvalue="id">
<p>Name of user (autocomplete.value): {{autocomplete1.value}} </p>
- Type ‘user’ and select the first user
- Let the input field blur by clicking somewhere else, it’ll jump to the second user.