You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The library calls json.encode in the "selection_recovery" event, where json is obtained via Phoenix.json_library. However, the builtin JSON module does not provide an encode function, only encode!.
Expected behavior
Selection recovery succeeds
Actual behavior
Selection recovery fails because of the invalid function call
Screenshots
If applicable (in most cases it is), do add a screenshot (or even better, a GIF or a video) that describes the problem.
Browsers
On which browsers did you notice the issue?
Issue Repo
You have the best chances of someone fixing the issue if you include a minimal repo that reproduces the problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
jhosteny
added a commit
to thoroai/live_select
that referenced
this issue
Jan 28, 2025
Hi @jhosteny and thank you so much for reporting this and creating a PR 🎉
I have to ask, since I'm not using Elixir anymore and I'm not up-to-date with the latest Phoenix/LV developments, what is the default JSON module that Phoenix.json_library() returns? Obviously not Jason, but also not this one either, because that one seems to have an encode function.
I searched a bit and I couldn't find an answer, maybe you can help me here. Thanks again.
LiveSelect and LiveView versions
1.5.3 / 1.0.2
Elixir 1.18.1
Erlang 27.2
Describe the bug
The library calls
json.encode
in the "selection_recovery" event, wherejson
is obtained viaPhoenix.json_library
. However, the builtinJSON
module does not provide anencode
function, onlyencode!
.Expected behavior
Selection recovery succeeds
Actual behavior
Selection recovery fails because of the invalid function call
Screenshots
If applicable (in most cases it is), do add a screenshot (or even better, a GIF or a video) that describes the problem.
Browsers
On which browsers did you notice the issue?
Issue Repo
You have the best chances of someone fixing the issue if you include a minimal repo that reproduces the problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: