Questions tagged [phoenix-live-view]

Phoenix LiveView is a feature of Elixir's Phoenix framework that enables rendering web pages on the server via HEEx templates, and updating them via websockets / Phoenix Channels. Use this tag together with [elixir] and/or [phoenix-framework] for questions specific to this feature.

Official github repository: https://github.com/phoenixframework/phoenix_live_view

138 questions
0
votes
0 answers

adding three.js to phoenix live view project

I'm trying to add three.js as a dependency to my Phoenix Project. At the moment, I've vendored a minified three.js version in /assets/vendor/three.min.js From there I added the following to my app.js: import * as THREE from…
0
votes
1 answer

How do i create LiveViews in phoenix

I have the following code for a simple live view which used to work on my other computer but i cannot seem to get it to work anymore: defmodule ProjectWeb.CounterLive do use Phoenix.LiveView def mount(_session, socket) do socket =…
Snek
  • 141
  • 1
  • 7
0
votes
1 answer

How to trigger handle_event function using quantum in Phoenix LiveView

I have a Quantum (Quantum is a cron job style code scheduler and module for Elixir) timed event and I want to perform the actions inside of a LiveView handle_event function each minute. The handle_event function takes three arguments and they are…
William
  • 4,422
  • 17
  • 55
  • 108
0
votes
1 answer

Elixir Phoenix Liveview Component Live Input File Deletes All Other Fields

I am following this tutorial, in which Ms. DeBenedetto masterfully explains how to do file uploads in a liveview component. I pretty much followed all the instructions, but get strange behavior when selecting the image to be uploaded by
paulrusu
  • 117
  • 1
  • 7
0
votes
1 answer

key :variable_name not found in

After config my project following the Github documentation https://github.com/phoenixframework/phoenix_live_view, I received this error, and I don't know what I did wrong. Complete project: https://github.com/ruannawe/live_view_counter defmodule…
Ruan Nawe
  • 363
  • 6
  • 9
0
votes
1 answer

Phoenix LiveView - (UndefinedFunctionError) no function clause matching with event_handler without any event to handle

This seems to be strange for me, but without any updates of libraries or even elixir part of app doesnt work like before. I have got few views which show list of products, categories, brands etc. Problem seems to be repeated everytime being in show…
0
votes
1 answer

Why do I get a target of "undefined" from this `phx-change` event?

I've got a
Nathan Long
  • 122,748
  • 97
  • 336
  • 451
0
votes
1 answer

VegaLIte Charts Rendering - Elixir, Phoenix, SurfaceUI

How VegaLite charts can be rendered in Elixir, Phoenix, SurfaceUI component ? alias VegaLite, as: Vl # Initialize the specification, optionally with some top-level properties Vl.new(width: 400, height: 400) # Specify data source for the graphic,…
0
votes
1 answer

How to update an element on a Live page once a background task has been finished?

I have a table on a LV page. Each row has a button which is supposed to refresh data in a row. To refresh it, it has to send at least one request to an external API which may take a few seconds or as well as a few minutes. Data received from an…
Koklushkin
  • 155
  • 7
0
votes
0 answers

A project created with phoenix 1.7-rc fails to compile

I installed Phoenix 1.7-rc along with Elixir 1.14.1 and Erlang/OTP 24. I then created a new project using mix phx.new command. The compilation fails with the following error: Unchecked dependencies for environment dev: * phoenix (Hex package) the…
101V
  • 492
  • 1
  • 6
  • 13
0
votes
1 answer

Phoenix Elixir Getting UndefinedFunctionError at GET/Users and it exist

I'm building out a view to list/edit/destroy users within the admin namespace, using LiveView (new to Phoenix Elixir). I cannot for some reason, use the method list_users, which is defined in the admin.ex context file. How do I gain access to and…
valcod3r
  • 321
  • 4
  • 14
0
votes
0 answers

Find and Kill PID from Previous Phoenix Session [Phoenix/Elixir]

To Stop Processes Resulting from mix phx.server Command in Previous Session I ran mix phx.server I did not type ctrl-c x2 to terminate the resulting processes I quit the my text editor I try to rerun mix phx.server and get this error: What I've…
Andrew Bregman
  • 190
  • 1
  • 17
0
votes
1 answer

Javascript When Installing Tailwind CSS is not working

I followed this tutorial https://tailwindcss.com/docs/guides/phoenix Everything appears to work fine except for the javascript and the annoying phoenix banner. Can anyone resolve my issue? this is my current page When I tap "solutions" nothing…
Greg W.F.R
  • 544
  • 1
  • 5
  • 13
0
votes
1 answer

Single quotes cause LiveView template processing error

I want to use the following Tainwind classes in my Phoenix LiveView template:
But the single quotes are not processed correctly, and result in the…
vaer-k
  • 10,923
  • 11
  • 42
  • 59
0
votes
1 answer

Phoenix live view link not working with dynamic element

I have code in an html.eex file that needs to render a series of links and I'm using this code currently, <%= for item <- @links do %> <%= link(item, to: URI.parse(item))%> <% end %> However when this renders it just to an email it just puts it…
William Ross
  • 3,568
  • 7
  • 42
  • 73