Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on phoenix_live_view 0.20.4? #58

Closed
Cowa opened this issue Feb 5, 2024 · 6 comments
Closed

Not working on phoenix_live_view 0.20.4? #58

Cowa opened this issue Feb 5, 2024 · 6 comments

Comments

@Cowa
Copy link

Cowa commented Feb 5, 2024

Hello!

With the update of LiveView 0.20.4, live_select seems to no longer work.

When clicking on the input there is this error in the console:
Uncaught TypeError: form is null

When I downgrade LiveView to 0.20.3, it's working.

error.mov
@maxmarcon
Copy link
Owner

Hi @Cowa! Can you please show me how you're rendering live select in your code?

@Cowa
Copy link
Author

Cowa commented Feb 6, 2024

I am rendering like this:

<.form for={@form} phx-change="organization_selected">
  <.live_select
    field={@form[:organization_reference]}
    id="search_input"
  />
</.form>

@form is set like this: assign(socket, :form, to_form(%{"organization_reference" => ""}))}

@maxmarcon
Copy link
Owner

I see a different error:

image

This is most likely a bug in live view JS stack. I suggest you open an issue there with a minimal repo that reproduces it. I'm sure Chris and Co will fix it in no time!

@maxmarcon
Copy link
Owner

by the way, if you do create an issue for LV, it would be great if you could linked it here. Thanks!

@maxmarcon
Copy link
Owner

looks like this is the issue: phoenixframework/phoenix_live_view#3095

@Cowa
Copy link
Author

Cowa commented Feb 8, 2024

Thanks for finding out it was a bug on LiveView.
The bug is fixed with LiveView 0.20.5, I close this issue!

@Cowa Cowa closed this as completed Feb 8, 2024
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

No branches or pull requests

2 participants