Skip to content

Commit

Permalink
Merge pull request #28 from naymspace/feature/fix-whitespaces
Browse files Browse the repository at this point in the history
Fix whitespaces when no live resource is specified
  • Loading branch information
Flo0807 authored Dec 21, 2023
2 parents f66ae5a + 8fa80f4 commit 33f425b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/backpex/fields/has_many.ex
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ defmodule Backpex.Fields.HasMany do

~H"""
<%= if is_nil(@link) do %>
<p class={@live_action in [:index, :resource_action] && "truncate"}>
<span class={@live_action in [:index, :resource_action] && "truncate"}>
<%= HTML.pretty_value(@display_text) %>
</p>
</span>
<% else %>
<.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}>
<%= @display_text %>
Expand Down
4 changes: 2 additions & 2 deletions lib/backpex/fields/many_to_many.ex
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ defmodule Backpex.Fields.ManyToMany do

~H"""
<%= if is_nil(@link) do %>
<p class={@live_action in [:index, :resource_action] && "truncate"}>
<span class={@live_action in [:index, :resource_action] && "truncate"}>
<%= HTML.pretty_value(@display_text) %>
</p>
</span>
<% else %>
<.link navigate={@link} class={["hover:underline", @live_action in [:index, :resource_action] && "truncate"]}>
<%= @display_text %>
Expand Down

0 comments on commit 33f425b

Please sign in to comment.