Replies: 1 comment
-
@AlexPeret thanks for reporting! Ah yeah I think you are right, Alpine's $watch function won't fire if it thinks the value hasn't changed, so what you are seeing makes sense to me. I will try to have a look into it over the weekend 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
hi!
I've figured the input field won't show the text from selected option whenever the user types in the complete option's text.
You can simulate the issue by running the Livewire Autocomplete Demo.
Steps to reproduce the issue:
Result:
the input field won't show the option's text (see images attached).
Typing the following options do work:
While debugging it, I've figured adding the line below to method
setSelected
(from vendor/joshhanley/livewire-autocomplete/resources/views/autocomplete.blade.php) fixes the issue.I believe it is due to Alpine.js'
$watch
function caching the previous value and preventing the last change. Unfortunately, I don't have enough knowledge of Alpine.js to debug this problem further.Thanks,
Alex
Before clicking on the option:

After clicking on the option:

Beta Was this translation helpful? Give feedback.
All reactions