Skip to content

Commit

Permalink
dropdown js not prevent default
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Dec 3, 2022
1 parent 08f6001 commit 945eb3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion assets/js/controllers/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default class extends Controller {

clickOutside(event) {
// example to close a modal
event.preventDefault()
//event.preventDefault()
this.menuTarget.classList.add("hidden")
//this.toggleTransition()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defmodule RauversionWeb.PlaylistLive.CreateFormComponent do
<li class="py-4">
<div class="flex items-center space-x-4">
<div class="flex-shrink-0">
<% IO.inspect(item) %>
<% # IO.inspect(item) %>
<%
#= img_tag(Rauversion.Tracks.proxy_cover_representation_url(item.track),
#class: "h-8 w-8 rounded-full")
Expand Down Expand Up @@ -167,8 +167,10 @@ defmodule RauversionWeb.PlaylistLive.CreateFormComponent do
</.form>
<% else %>
<%= @playlist.title %>
<%= live_redirect "Go to playlist", to: Routes.playlist_show_path(@socket, :show, @playlist) %>
<h3 class="text-2xl p-4"><%= @playlist.title %></h3>
<div class="p-4 border border-gray-800">
<%= live_redirect "Go to playlist", to: Routes.playlist_show_path(@socket, :show, @playlist) %>
</div>
<% end %>
</section>
Expand Down
2 changes: 1 addition & 1 deletion lib/rauversion_web/live/playlist_live/form_component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ defmodule RauversionWeb.PlaylistLive.FormComponent do
socket.assigns.playlist
|> Playlists.change_playlist(playlist_params)
|> Map.put(:action, :validate)

IO.inspect("validoooooo!")
{:noreply, assign(socket, :changeset, changeset)}
end

Expand Down

0 comments on commit 945eb3c

Please sign in to comment.