Skip to content

Conversation

gmazzamuto
Copy link
Contributor

@gmazzamuto gmazzamuto commented Sep 18, 2025

  • Fix the following error in the web console on reconnect:
nothing found matching the phx-target selector "my_form_city_search_live_select_component"
  • Fix a crash with key :disabled not found (see commit message for more details):
** (KeyError) key :disabled not found in: %{label: "Rome", value: %{"name" => "Rome", "pos" => [12.51133, 41.89193]}}
    (live_select 1.7.1) lib/live_select/component.html.heex:115: anonymous fn/3 in LiveSelect.Component.render/1

`this.el.id` would require a hash ("#"), but it's better to pass the DOM
element since this is supported.

Fixes the following error in the web console on reconnect:
nothing found matching the phx-target selector "my_form_city_search_live_select_component"
Steps to reproduce this bug:
* Select a city in the LiveSelect
* Disconnect and reconnect the `liveSocket` to force form recovery
* Just click on the LiveSelect, the view will crash with:

** (KeyError) key :disabled not found in: %{label: "Rome", value: %{"name" => "Rome", "pos" => [12.51133, 41.89193]}}
    (live_select 1.7.1) lib/live_select/component.html.heex:115: anonymous fn/3 in LiveSelect.Component.render/1
@gmazzamuto gmazzamuto changed the title js: fix call to pushEventTo form recovery: fix javascript error and the live view crashing Sep 21, 2025
@maxmarcon
Copy link
Owner

Thank you!!! 🙏🚀🎉

@maxmarcon maxmarcon merged commit 8d748e5 into maxmarcon:main Oct 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants