<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="278917" data-post-id="278917">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="addstar" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  addstar
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nice one! I recently made a similar feature. A couple of things I noticed.</p>
<p>You can have multiple items highlighted if your mouse is in the results section and if you use the arrow keys. Prob not really an issue but the way I approached this was to set the attribute <code>aria-selected</code> on the item using a combination of keydown and mouseenter/mouseleave events.</p>
<p>If you have a long list of results and you use the arrow keys it doesn’t auto scroll. Look into <code>scrollIntoView</code>.</p>
<p>You should probably also use <code>&lt;.focus_wrap /&gt;</code> around your modal for accessibility.</p>
<p>How did did you approach changing the keyboard shortcut icon e.g. the command icon to a windows icon based on the users OS?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="278917" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-278917" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="278917"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="279016" data-post-id="279016">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="caspg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caspg/120/18520_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  caspg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/milangupta" rel="nofollow">@milangupta</a> Nice suggestion, thanks. I will add this soon.</p>
<p><a class="mention" href="/u/addstar" rel="nofollow">@addstar</a> Thanks for all the pointers. I will need to work on improving that key selects. I didn’t approach changing the keyboard shortcut at all yet.</p>
<p>Maybe I will have to use some JS, like this one <a href="https://stackoverflow.com/a/69860307/4490927" rel="noopener nofollow ugc">https://stackoverflow.com/a/69860307/4490927</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="279016" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-279016" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="279016"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="279018" data-post-id="279018">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="caspg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caspg/120/18520_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  caspg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I just stumbled upon this post <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"> <a href="https://fly.io/phoenix-files/pass-user-agent-info-to-your-liveview/" class="inline-onebox" rel="noopener nofollow ugc">Pass User Agent info to your LiveView · The Phoenix Files</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="279018" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-279018" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="279018"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="281081" data-post-id="281081">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shakesmonos" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shakesmonos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/caspg" rel="nofollow">@caspg</a> , Thanks for sharing this!</p>
<p>I’m very new to Phoenix and Elixir, and I’m struggling to figure out how to add the search form to my app.html.heex file. (and I’m not actually sure I’ve put the files in the correct place.)</p>
<p>A bit of background:  I started learning Phoenix and Elixir just about 5 weeks ago, to rescue my site from an old version of Ruby, and get the site back on its feet. I managed to get that done, and I relaunched it on Heroku ( <a href="https://www.shakespeare-monologues.org" rel="noopener nofollow ugc">https://www.shakespeare-monologues.org</a> .)</p>
<p>I relaunched it without a search field, and am hoping to use your example to restore search. (I’m not actually a developer.  A friend wrote the Ruby version of the site, but wasn’t available to help restore it when the Ruby version got too old for Heroku, so I rebuilt the site in Phoenix / Elixir. Very happy with the difference so far.)</p>
<p>I’ve installed Tailwind alongside bootstrap, with the intent of using Tailwind just to implement your search solution (at least for now.)</p>
<p>Being new to Phoenix, then just having jumped from 1.6 to 1.7.1 last night (in my local dev environment), I’m feeling quite unsure about where to put each of the files from your example.</p>
<p><strong>For now, I’ve put my edited versions of your example files in</strong> <code>lib/mono_phoenix_v01_web/controllers</code>, <strong>Will that work?</strong> (No compile errors or warnings, but I haven’t actually tested the search yet, because…)</p>
<p><strong>My primary question is: I’m in need of an example of what to put in</strong> <code>lib/mono_phoenix_v01_web/templates/layout/app.html.heex</code> <strong>to add the search field and modal. And what should the route look like in</strong> <code>router.ex</code>?</p>
<p>I’ll include my edited versions of your example files, in case they’re relevant:</p>
<p><code>lib/mono_phoenix_v01_web/controllers/searchbar_live.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MonoPhoenixV01Web.SearchbarLive do
  use MonoPhoenixV01Web, :live_view

  alias Phoenix.LiveView.JS
  alias MonoPhoenixV01.Monologues

  def mount(_params, _session, socket) do
    socket = assign(socket, monologues: [])
    {:ok, socket, layout: false}
  end

  def handle_event("change", %{"search" =&gt; %{"query" =&gt; ""}}, socket) do
    socket = assign(socket, :monologues, [])
    {:noreply, socket}
  end

  def handle_event("change", %{"search" =&gt; %{"query" =&gt; search_query}}, socket) do
    monologues = Monologues.search(search_query)
    socket = assign(socket, :monologues, monologues)

    {:noreply, socket}
  end

  def open_modal(js \\ %JS{}) do
    js
    |&gt; JS.show(
      to: "#searchbox_container",
      transition:
        {"tw-transition tw-ease-out tw-duration-200", "tw-opacity-0 tw-scale-95",
         "tw-opacity-100 tw-scale-100"}
    )
    |&gt; JS.show(
      to: "#searchbar-dialog",
      transition: {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-0", "tw-opacity-100"}
    )
    |&gt; JS.focus(to: "#search-input")
  end

  def hide_modal(js \\ %JS{}) do
    js
    |&gt; JS.hide(
      to: "#searchbar-searchbox_container",
      transition:
        {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-100 tw-scale-100",
         "tw-opacity-0 tw-scale-95"}
    )
    |&gt; JS.hide(
      to: "#searchbar-dialog",
      transition: {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-100", "tw-opacity-0"}
    )
  end
end
</code></pre>
<p><code>lib/mono_phoenix_v01_web/controllers/searchbar_live.html.heex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;div class="tw-block tw-max-w-xs tw-flex-auto"&gt;
  &lt;button
    type="button"
    class="tw-hidden tw-text-gray-500 tw-bg-white hover:tw-ring-gray-500 tw-ring-gray-300 tw-h-8 tw-w-full items-center tw-gap-2 tw-rounded-md tw-pl-2 tw-pr-3 tw-text-sm tw-ring-1 tw-transition lg:tw-flex focus:tw-[&amp;:not(:focus-visible)]:outline-none"
    phx-click={open_modal()}
  &gt;
    &lt;svg
      viewBox="0 0 20 20"
      fill="none"
      aria-hidden="true"
      class="tw-h-5 tw-w-5 tw-stroke-current"
    &gt;
      &lt;path
        stroke-linecap="round"
        stroke-linejoin="round"
        d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"
      &gt;
      &lt;/path&gt;
    &lt;/svg&gt;
    Search for monologues...
  &lt;/button&gt;
&lt;/div&gt;

&lt;div
  id="searchbar-dialog"
  class="tw-hidden tw-fixed tw-inset-0 z-50"
  role="dialog"
  aria-modal="true"
  phx-window-keydown={hide_modal()}
  phx-key="escape"
&gt;
  &lt;div class="tw-fixed tw-inset-0 tw-bg-zinc-400/25 tw-backdrop-blur-sm tw-opacity-100"&gt;&lt;/div&gt;
  &lt;div class="tw-fixed tw-inset-0 tw-overflow-y-auto tw-px-4 tw-py-4 sm:tw-py-20 sm:tw-px-6 md:tw-py-32 lg:tw-px-8 lg:tw-py-[15vh]"&gt;
    &lt;div
      id="searchbox_container"
      class="tw-mx-auto tw-overflow-hidden tw-rounded-lg tw-bg-zinc-50 tw-shadow-xl tw-ring-zinc-900/7.5 sm:tw-max-w-xl tw-opacity-100 tw-scale-100"
      phx-hook="SearchBar"
    &gt;
      &lt;div
        role="combobox"
        aria-haspopup="listbox"
        phx-click-away={hide_modal()}
        aria-expanded={@monologues != []}
      &gt;
        &lt;form action="" novalidate="" role="search" phx-change="change"&gt;
          &lt;div class="tw-group tw-relative tw-flex tw-h-12"&gt;
            &lt;svg
              viewBox="0 0 20 20"
              fill="none"
              aria-hidden="true"
              class="tw-pointer-events-none tw-absolute tw-left-3 tw-top-0 tw-h-full tw-w-5 tw-stroke-zinc-500"
            &gt;
              &lt;path
                stroke-linecap="round"
                stroke-linejoin="round"
                d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"
              &gt;
              &lt;/path&gt;
            &lt;/svg&gt;

            &lt;input
              id="search-input"
              name="search[query]"
              class="tw-flex-auto tw-rounded-lg tw-appearance-none tw-bg-transparent tw-pl-10 tw-text-zinc-900 tw-outline-none focus:tw-outline-none tw-border-slate-200 focus:tw-border-slate-200 focus:tw-ring-0 focus:tw-shadow-none placeholder:tw-text-zinc-500 focus:tw-full focus:tw-flex-none sm:tw-text-sm [&amp;::-webkit-search-cancel-button]:hidden [&amp;::-webkit-search-decoration]:hidden [&amp;::-webkit-search-results-button]:hidden [&amp;::-webkit-search-results-decoration]:hidden pr-4"
              style={
                @monologues != [] &amp;&amp;
                  "tw-border-bottom-left-radius: 0; tw-border-bottom-right-radius: 0; tw-border-bottom: none"
              }
              aria-autocomplete="both"
              aria-controls="searchbox__results_list"
              autocomplete="off"
              autocorrect="off"
              autocapitalize="off"
              enterkeyhint="search"
              spellcheck="false"
              placeholder="Search for monologues"
              type="search"
              value=""
              tabindex="0"
            /&gt;
          &lt;/div&gt;

          &lt;ul
            :if={@monologues != []}
            class="tw-divide-y tw-divide-slate-200 tw-overflow-y-auto tw-rounded-b-lg tw-border-t tw-border-slate-200 tw-text-sm tw-leading-6"
            id="searchbox__results_list"
            role="listbox"
          &gt;
            &lt;%= for monologue &lt;- @monologues do %&gt;
              &lt;li id={"#{monologue.id}"}&gt;
                &lt;.link
                  navigate={~p"/monologues/#{monologue.slug}"}
                  class="tw-block tw-p-4 hover:tw-bg-slate-100 focus:tw-outline-none focus:tw-bg-slate-100 focus:tw-text-sky-800"
                &gt;
                  &lt;%= monologue.body %&gt;
                &lt;/.link&gt;
              &lt;/li&gt;
            &lt;% end %&gt;
          &lt;/ul&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

</code></pre>
<p><code>lib/mono_phoenix_v01_web/controllers/monologues.ex</code></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MonoPhoenixV01.Monologues do
  @moduledoc """
  The search query thingy
  """
  import Ecto.Query, warn: false
  alias MonoPhoenixV01.Repo
  alias MonoPhoenixV01.Monologues.Monologue

  def search(search_query) do
    search_query = "%#{search_query}%"

    Monologue
    |&gt; order_by(asc: :body)
    |&gt; where([p], ilike(p.body, ^search_query))
    |&gt; limit(15)
    |&gt; Repo.all()
  end
end

</code></pre>
<p>Thanks in advance to anyone who is willing to give this n00b some hints on how to implement this cool search bar.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281081" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-281081" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281081"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="281162" data-post-id="281162">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="caspg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caspg/120/18520_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  caspg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>You just need to render SearchbarLive somewhere in your app.html.heex. In my case, I’m using <a href="https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#live_render/3" rel="noopener nofollow ugc">live_render</a> in my navbar:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;%= live_render(
  @conn,
  TravelerWeb.SearchbarLive,
  id: "searchbar",
  container: {:div, class: "flex items-center lg:w-full"}
) %&gt;
</code></pre>
<p>You don’t need to add anything to your router. You only need to <a href="https://hexdocs.pm/phoenix_live_view/installation.html" rel="noopener nofollow ugc">install and setup</a> LiveView but it’s probably already done by phx generator.</p>
<p>Where to put files? It doesn’t really matter where you put files but there is specific phoenix convention (and Phoenix 1.7 introduced a new concepts).</p>
<p>My search bar “live” files are in <code>lib/traveler_web/live/</code> and my module responsible for DB search is in <code>lib/traveler/places/</code>  (not in the traveler_web folder).</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">lib/traveler/places.ex
lib/traveler_web/live/searchbar_live.ex
</code></pre>
<p>In your case it should be:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">lib/mono_phoenix_v01/monologues.ex

lib/mono_phoenix_v01_web/live/searchbar_live.ex
lib/mono_phoenix_v01_web/live/searchbar_live.html.heex
</code></pre>
<p>Hope that helps. You can read more about directory structure <a href="https://hexdocs.pm/phoenix/directory_structure.html" rel="noopener nofollow ugc">here</a>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281162" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-281162" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281162"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="281259" data-post-id="281259">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shakesmonos" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shakesmonos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you so much <a class="mention" href="/u/caspg" rel="nofollow">@caspg</a>!</p>
<p>I’m now unblocked and moving forward with integrating your cool solution into my site, thanks to this incantation:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;%= live_render(
  @conn,
  MonoPhoenixV01Web.SearchbarLive,
  id: "searchbar",
  container: {:div, class: "tw-flex tw-items-center lg:tw-w-full"}
) %&gt;
</code></pre>
<p>Have a great weekend!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281259" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-281259" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281259"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="281342" data-post-id="281342">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shakesmonos" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shakesmonos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>(edit 2: the error I thought I’d resolve was not resolved after all, so reverted to initial post, then added some more error output.)</p>
<p>Well, I got myself blocked again. (n00bs, man. sheesh.)</p>
<p>After several hours of googling, reading docs, tutorials, blog posts, slackexchange threads, searching these forums and reading threads, and trying different things, the error remains. So I thought I’d better “pull off of the highway to ask someone for directions” again (that’s a reference to a time before GPS. lol)</p>
<p>I get the feeling I’m missing something obvious that an actual developer would have already thought of, so please feel free to mention things that should be obvious to people who actually know what they’re doing. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
<p>How I got here:  I’m able to get the search bar to appear where I want it, but clicking on it has no effect, other than moving the border from left and top, to bottom and right when I’m holding down the left mouse button, then it goes back to left and to when I release the left-mouse button.  But there are no additional errors generated in the logs in the phx server terminal window, and no errors in Chrome’s dev Console, when I click in the search bar. (this behavior remains even after the renamings described below.)</p>
<p>So, I did some renaming after realizing the naming shown in my previous post may conflict with a <code>def monologues(conn, params) do</code> I already had in <code>lib/mono_phoenix_v01_web/controllers/monologues_page_controller.ex</code> (it includes an ecto query, with a join, and one of the tables is named <code>monologues</code>)</p>
<p>After the renamings, I’m getting:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: no route path for MonoPhoenixV01Web.Router matches "/monofinds/#{monofind.slug}"
  lib/mono_phoenix_v01_web/live/searchbar_live.html.heex:87: MonoPhoenixV01Web.SearchbarLive.render/1
</code></pre>
<p>(As you can see there, I have included support for verified routes when upgrading from Phoenix 1.6.15 to 1.7.1.)</p>
<p>Here’s that snippet from <code>searchbar_live.html.heex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">          &lt;ul
            :if={@monofinds != []}
            class="divide-y divide-slate-200 overflow-y-auto rounded-b-lg border-t border-slate-200 text-md leading-6"
            id="searchbox__results_list"
            role="listbox"
          &gt;
            &lt;%= for monofind &lt;- @monofinds do %&gt;
              &lt;li id={"#{monofind.id}"}&gt;
                &lt;.link
                  navigate={~p"/monofinds/#{monofind.slug}"}
                  class="block p-4 hover:bg-slate-100 focus:outline-none focus:bg-slate-100 focus:text-sky-800"
                &gt;
                  &lt;%= monofind.body %&gt;
                &lt;/.link&gt;
              &lt;/li&gt;
            &lt;% end %&gt;
          &lt;/ul&gt;
</code></pre>
<p>Then I noticed in my root.html.heex I’d commented out <code>/assets/app.js</code> when I was troubleshooting something, and forgot to restore it, so I uncommented it.</p>
<p>I also uncommented <code>liveSocket.enableDebug()</code>.  I got some new info.  This in the phx server console logs:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[info] Sent 200 in 4ms
[info] CONNECTED TO Phoenix.LiveView.Socket in 75µs
  Transport: :websocket
  Serializer: Phoenix.Socket.V2.JSONSerializer
  Parameters: %{"_csrf_token" =&gt; "JjUcMwBFPQ1MOUcSZQ1GeDkEaGscNGBDNzZdWrhG4j-h48qLua12Hn5q", "_live_referer" =&gt; "undefined", "_mounts" =&gt; "0", "_track_static" =&gt; %{"0" =&gt; "http://localhost:4000/assets/css/normalize.css", "1" =&gt; "http://localhost:4000/assets/css/tailwind.css", "2" =&gt; "http://localhost:4000/assets/app.css", "3" =&gt; "http://localhost:4000/assets/css/application.css"}, "vsn" =&gt; "2.0.0"}

[debug] MOUNT MonoPhoenixV01Web.SearchbarLive
  Parameters: :not_mounted_at_router
  Session: %{"_csrf_token" =&gt; "hOFWW7UJxSjzQ574LeYYTZU2"}
[debug] Replied in 126µs
</code></pre>
<p>Is that <code>:not_mounted_at_router</code> related to the trouble?</p>
<p>I am not using any slugs in my app yet (or, at least, grepping finds no other instances of “slug”), could I be lacking something that slugs depend on?</p>
<p>Here are my deps:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    [
      {:phoenix, "~&gt; 1.7.1", override: true},
      {:phoenix_ecto, "~&gt; 4.4"},
      {:ecto_sql, "~&gt; 3.6"},
      {:postgrex, "&gt;= 0.0.0"},
      {:phoenix_html, "~&gt; 3.0"},
      {:phoenix_view, "~&gt; 2.0"},
      {:phoenix_live_reload, "~&gt; 1.2", only: :dev},
      {:phoenix_live_view, "~&gt; 0.18.15"},
      {:phoenix_live_dashboard, "~&gt; 0.7.2"},
      {:esbuild, "~&gt; 0.4", runtime: Mix.env() == :dev},
      {:tailwind, "~&gt; 0.1.9", runtime: Mix.env() == :dev},
      {:swoosh, "~&gt; 1.3"},
      {:telemetry_metrics, "~&gt; 0.6"},
      {:telemetry_poller, "~&gt; 1.0"},
      {:gettext, "~&gt; 0.18"},
      {:jason, "~&gt; 1.2"},
      {:plug_cowboy, "~&gt; 2.5"},
      {:redirect, "~&gt; 0.4.0"},
      {:html_assertion, "0.1.5", only: :test},
      {:floki, "&gt;= 0.30.0", only: :test},
      {:credo, "~&gt; 1.6", only: [:dev, :test], runtime: false}
    ]
</code></pre>
<p>Then again, I didn’t see the error until I changed instance of “Monologues” to “Monofinds”, “Monologue” to “Monofind”, “monologues” to “monofinds”, and “monologue” to “monofind”. So, I’m a baffled n00b.</p>
<p>In case it’s useful in helping me troubleshoot, below are my current versions of the files from <a class="mention" href="/u/caspg" rel="nofollow">@caspg</a> 's ‘TravelWeb’ example. (Please let me know if there are any other files I should paste the contents of. I didn’t include my <code>router.ex</code>, because you’d mentioned there’s no need to add any new routes.)</p>
<p>I’m rendering it in <code>lib/mono_phoenix_v01_web/templates/plays_page/plays.html.heex</code>, thusly:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  &lt;div class="absolute top-24 w-5/6"&gt;
    &lt;%= live_render(
      @conn,
      MonoPhoenixV01Web.SearchbarLive,
      id: "searchbar",
      container:
        {:div,
         class: "flex flex-wrap justify-between items-start text-left items-center lg:w-full"}
    ) %&gt;
  &lt;/div&gt;
</code></pre>
<p><code>lib/mono_phoenix_v01/monofinds/monofinds.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MonoPhoenixV01.Monofinds do
  @moduledoc """
  The search query thingy
  """
  import Ecto.Query, warn: false
  alias MonoPhoenixV01.Repo
  alias MonoPhoenixV01.Monofinds.Monofind

  def search(search_query) do
    search_query = "%#{search_query}%"

    Monofind
    |&gt; order_by(asc: :body)
    |&gt; where([p], ilike(p.body, ^search_query))
    |&gt; limit(15)
    |&gt; Repo.all()
  end
end
</code></pre>
<p><code>lib/mono_phoenix_v01_web/live/searchbar_live.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MonoPhoenixV01Web.SearchbarLive do
  use MonoPhoenixV01Web, :live_view

  alias Phoenix.LiveView.JS
  alias MonoPhoenixV01.Monofinds

  def mount(_params, _session, socket) do
    socket = assign(socket, monofinds: [])
    {:ok, socket, layout: false}
  end

  def handle_event("change", %{"search" =&gt; %{"query" =&gt; ""}}, socket) do
    socket = assign(socket, :monofinds, [])
    {:noreply, socket}
  end

  def handle_event("change", %{"search" =&gt; %{"query" =&gt; search_query}}, socket) do
    monofinds = Monofinds.search(search_query)
    socket = assign(socket, :monofinds, monofinds)

    {:noreply, socket}
  end

  def open_modal(js \\ %JS{}) do
    js
    |&gt; JS.show(
      to: "#searchbox_container",
      transition:
        {"tw-transition tw-ease-out tw-duration-200", "tw-opacity-0 tw-scale-95",
         "tw-opacity-100 tw-scale-100"}
    )
    |&gt; JS.show(
      to: "#searchbar-dialog",
      transition: {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-0", "tw-opacity-100"}
    )
    |&gt; JS.focus(to: "#search-input")
  end

  def hide_modal(js \\ %JS{}) do
    js
    |&gt; JS.hide(
      to: "#searchbar-searchbox_container",
      transition:
        {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-100 tw-scale-100",
         "tw-opacity-0 tw-scale-95"}
    )
    |&gt; JS.hide(
      to: "#searchbar-dialog",
      transition: {"tw-transition tw-ease-in tw-duration-100", "tw-opacity-100", "tw-opacity-0"}
    )
  end
end
</code></pre>
<p><code>lib/mono_phoenix_v01_web/live/searchbar_live.html.heex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">&lt;div class="block max-w-96 flex-auto"&gt;
  &lt;button
    type="button"
    class="tw-hidden flex items-start text-left text-gray-500 bg-white hover:ring-gray-500 ring-gray-300 h-12 w-full items-center gap-1 rounded-md pl-2 pr-3 text-2xl ring-1 transition lg:flex focus:[&amp;:not(:focus-visible)]:outline-none"
    phx-click={open_modal()}
  &gt;
    &lt;svg viewBox="0 0 20 20" fill="none" aria-hidden="true" class="h-7 w-7 stroke-current"&gt;
      &lt;path
        stroke-linecap="round"
        stroke-linejoin="round"
        d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"
      &gt;
      &lt;/path&gt;
    &lt;/svg&gt;
    Search for monologues...
  &lt;/button&gt;
&lt;/div&gt;

&lt;div
  id="searchbar-dialog"
  class="hidden fixed inset-0 z-50"
  role="dialog"
  aria-modal="true"
  phx-window-keydown={hide_modal()}
  phx-key="escape"
&gt;
  &lt;div class="fixed inset-0 bg-zinc-400/25 backdrop-blur-sm opacity-100"&gt;&lt;/div&gt;
  &lt;div class="fixed inset-0 overflow-y-auto px-4 py-4 sm:py-20 sm:px-6 md:py-32 lg:px-8 lg:py-[15vh]"&gt;
    &lt;div
      id="searchbox_container"
      class="mx-auto overflow-hidden rounded-lg bg-zinc-50 shadow-xl ring-zinc-900/7.5 md:max-w-xl opacity-100 scale-100"
      phx-hook="SearchBar"
    &gt;
      &lt;div
        role="combobox"
        aria-haspopup="listbox"
        phx-click-away={hide_modal()}
        aria-expanded={@monofinds != []}
      &gt;
        &lt;form action="" novalidate="" role="search" phx-change="change"&gt;
          &lt;div class="group relative flex h-12"&gt;
            &lt;svg
              viewBox="0 0 20 20"
              fill="none"
              aria-hidden="true"
              class="pointer-events-none absolute left-3 top-0 h-full w-5 stroke-zinc-500"
            &gt;
              &lt;path
                stroke-linecap="round"
                stroke-linejoin="round"
                d="M12.01 12a4.25 4.25 0 1 0-6.02-6 4.25 4.25 0 0 0 6.02 6Zm0 0 3.24 3.25"
              &gt;
              &lt;/path&gt;
            &lt;/svg&gt;

            &lt;input
              id="search-input"
              name="search[query]"
              class="flex-auto rounded-lg appearance-none bg-transparent pl-10 text-zinc-900 outline-none focus:outline-none border-slate-200 focus:border-slate-200 focus:ring-0 focus:shadow-none placeholder:text-zinc-500 focus:w-full focus:flex-none md:text-md [&amp;::-webkit-search-cancel-button]:hidden [&amp;::-webkit-search-decoration]:hidden [&amp;::-webkit-search-results-button]:hidden [&amp;::-webkit-search-results-decoration]:hidden pr-4"
              style={
                @monofinds != [] &amp;&amp;
                  "border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: none"
              }
              aria-autocomplete="both"
              aria-controls="searchbox__results_list"
              autocomplete="off"
              autocorrect="off"
              autocapitalize="off"
              enterkeyhint="search"
              spellcheck="false"
              placeholder="Search for monologues"
              type="search"
              value=""
              tabindex="0"
            /&gt;
          &lt;/div&gt;

          &lt;ul
            :if={@monofinds != []}
            class="divide-y divide-slate-200 overflow-y-auto rounded-b-lg border-t border-slate-200 text-md leading-6"
            id="searchbox__results_list"
            role="listbox"
          &gt;
            &lt;%= for monofind &lt;- @monofinds do %&gt;
              &lt;li id={"#{monofind.id}"}&gt;
                &lt;.link
                  navigate={~p"/monofinds/#{monofind.slug}"}
                  class="block p-4 hover:bg-slate-100 focus:outline-none focus:bg-slate-100 focus:text-sky-800"
                &gt;
                  &lt;%= monofind.body %&gt;
                &lt;/.link&gt;
              &lt;/li&gt;
            &lt;% end %&gt;
          &lt;/ul&gt;
        &lt;/form&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>
<p><code>lib/mono_phoenix_v01_web/live/SearchBar.ts</code></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">// This is optional phoenix client hook. It allows to use key down and up to select results.

export const SearchBar = {
    mounted() {
      const searchBarContainer = (this as any).el as HTMLDivElement
      document.addEventListener('keydown', (event) =&gt; {
        if (event.key !== 'ArrowUp' &amp;&amp; event.key !== 'ArrowDown') {
          return
        }
  
        const focusElemnt = document.querySelector(':focus') as HTMLElement
  
        if (!focusElemnt) {
          return
        }
  
        if (!searchBarContainer.contains(focusElemnt)) {
          return
        }
  
        event.preventDefault()
  
        const tabElements = document.querySelectorAll(
          '#search-input, #searchbox__results_list a',
        ) as NodeListOf&lt;HTMLElement&gt;
        const focusIndex = Array.from(tabElements).indexOf(focusElemnt)
        const tabElementsCount = tabElements.length - 1
  
        if (event.key === 'ArrowUp') {
          tabElements[focusIndex &gt; 0 ? focusIndex - 1 : tabElementsCount].focus()
        }
  
        if (event.key === 'ArrowDown') {
          tabElements[focusIndex &lt; tabElementsCount ? focusIndex + 1 : 0].focus()
        }
      })
    },
  }
</code></pre>
<p>Sidenote question on the .ts file:  Is <code>focusElemnt</code> a typo or purposeful/ correct?  (I’m guessing the latter, but thought I’d double-check.)</p>
<p>Thanks in advance to <a class="mention" href="/u/caspg" rel="nofollow">@caspg</a> and/ or anyone else willing to help me get unlost!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281342" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-281342" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281342"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="281464" data-post-id="281464">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="caspg" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/caspg/120/18520_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  caspg
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><code>focusElemnt</code> is a typo of course.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">warning: no route path for MonoPhoenixV01Web.Router matches "/monofinds/#{monofind.slug}"
</code></pre>
<p>Tells you that there is no such route defined in your <code>router.ex</code>. Can you show that file?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">:not_mounted_at_router
</code></pre>
<p>Is not an error. It should tell that this LiveView is not mounted directly at the router with <code>live /some-path, SomeLiveView</code></p>
<p>Do you have a staging environment? If not, can you deploy your changes to some hidden path just for debugging?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281464" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-281464" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281464"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="281525" data-post-id="281525">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shakesmonos" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shakesmonos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for the reply, and the help, <a class="mention" href="/u/caspg" rel="nofollow">@caspg</a>!</p>
<p>Ooh, you’d said before that I shouldn’t need to add a route. My liveDashboard works in my dev environment, so that made sense to me.</p>
<p>But that error kept making me think it was a route issue, so since my last post, I added this to my router:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"> live("/monofinds/:monofinds", SearchbarLive)
</code></pre>
<p>I don’t know if that’s correct, but it cleared the <code>no route path</code> warning.</p>
<p>However, I’m still getting the <code>:not_mounted_at_router</code> in the phx console.  I also noticed this in Chrome’s dev console:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">unknown hook found for "SearchBar"
</code></pre>
<p>Just above that, in Chrome’s dev console, is this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">app.js:1389 phx-F0wPiKxdk45twQbB mount:  -  {0: ' phx-click="[[&amp;quot;show&amp;quot;,{&amp;quot;display&amp;quot…ot;,{&amp;quot;to&amp;quot;:&amp;quot;#search-input&amp;quot;}]]"', 1: ' phx-window-keydown="[[&amp;quot;hide&amp;quot;,{&amp;quot;tim…pacity-100&amp;quot;],[&amp;quot;tw-opacity-0&amp;quot;]]}]]"', 2: ' phx-click-away="[[&amp;quot;hide&amp;quot;,{&amp;quot;time&amp;qu…pacity-100&amp;quot;],[&amp;quot;tw-opacity-0&amp;quot;]]}]]"', 3: '', 4: '', 5: '', s: Array(7)}0: " phx-click=\"[[&amp;quot;show&amp;quot;,{&amp;quot;display&amp;quot;:null,&amp;quot;time&amp;quot;:200 ... etc.
</code></pre>
<p>Here’s my current router file:</p>
<p><code>lib/mono_phoenix_v01_web/router.ex</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MonoPhoenixV01Web.Router do
  use MonoPhoenixV01Web, :router

  import Redirect

  pipeline :browser do
    plug(:accepts, ["html"])
    plug(:fetch_session)
    plug(:fetch_live_flash)
    plug(:put_root_layout, {MonoPhoenixV01Web.LayoutView, :root})
    plug(:protect_from_forgery)
    plug(:put_secure_browser_headers)
  end

  pipeline :api do
    plug(:accepts, ["json"])
  end

  scope "/", MonoPhoenixV01Web do
    pipe_through(:browser)

    get("/", StaticPageController, :home)
    get("/plays", PlaysPageController, :plays)
    get("/play/:playid", PlayPageController, :play)
    get("/mens", MensPageController, :mens)
    get("/men/:playid", MenplayPageController, :menplay)
    get("/womens", WomensPageController, :womens)
    get("/women/:playid", WomenplayPageController, :womenplay)
    get("/monologues/:monoid", MonologuesPageController, :monologues)
    get("/aboutus", StaticPageController, :aboutus)
    get("/faq", StaticPageController, :faq)
    get("/home", StaticPageController, :home)
    get("/links", StaticPageController, :links)
    get("/privacy", StaticPageController, :privacy)
    get("/maintenance", StaticPageController, :maintenance)
    get("/hello", PageController, :hello)
    get("/sandbox", PageController, :sandbox)
    live("/monofinds/:monofinds", SearchbarLive)
  end

  ## redirects for deep links from other sites. Will not work inside a scope.
  # redirect from /men/plays/123 to /men/123
  # redirect from /men/plays/123 to /men/123
  redirect("/men", "/mens", :permanent, preserve_query_string: true)
  redirect("/women", "/womens", :permanent, preserve_query_string: true)
  redirect("/men/plays/9", "/men/9", :permanent, preserve_query_string: true)
# [omitted from post: a few dozen more redirects to handle old/ legacy links from external sites]

  # Other scopes may use custom stacks.
  # scope "/api", MonoPhoenixV01Web do
  #   pipe_through :api
  # end

  # Enables LiveDashboard only for development
  #
  # If you want to use the LiveDashboard in production, you should put
  # it behind authentication and allow only admins to access it.
  # If your application does not have an admins-only section yet,
  # you can use Plug.BasicAuth to set up some basic authentication
  # as long as you are also using SSL (which you should anyway).
  
  if Mix.env() in [:dev, :test] do
    import Phoenix.LiveDashboard.Router

    scope "/" do
      pipe_through(:browser)

      live_dashboard("/dashboard", metrics: MonoPhoenixV01Web.Telemetry)
    end
  end

  # Enables the Swoosh mailbox preview in development.
  #
  # Note that preview only shows emails that were sent by the same
  # node running the Phoenix server.
  if Mix.env() == :dev do
    scope "/dev" do
      pipe_through(:browser)

      forward("/mailbox", Plug.Swoosh.MailboxPreview)
    end
  end
end
</code></pre>
<p>I don’t have a staging site deployed yet, but I’d planned to deploy one, before I deploy 1.7.1 to prod for the first time (current prod site is 1.6.15.)</p>
<p>I’ll go ahead and get the staging site deployed, and will follow-up with a link when it’s running.</p>
<p>In the meantime, I’m not sure if this is related, but it seems worth mentioning, in case:</p>
<p>I’ve got some static pages in the site as well (landing page, faq, aboutus, etc) so I have this in <code>lib/mono_phoenix_v01_web.ex</code></p>
<pre data-code-wrap="elixir"><code class="lang-elixir">  def verified_routes do
    quote do
      use Phoenix.VerifiedRoutes,
        endpoint: MonoPhoenixV01Web.Endpoint,
        router: MonoPhoenixV01Web.Router,
        statics: MonoPhoenixV01Web.static_paths()
    end
  end
</code></pre>
<p>Seems like it could be having an impact on tailwind’s use of <code>assets/js/app.js</code> and <code>assets/css/app.css</code>, and how those files relate to files in <code>priv/static/assets</code>?<br>
Related reminder from an earlier post, I have this in <code>config/config.js</code>:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">config :tailwind,
  version: "3.2.4",
  default: [
    args: ~w(
    --config=tailwind.config.js
    --input=css/app.css
    --output=../priv/static/assets/css/tailwind.css
  ),
    cd: Path.expand("../assets", __DIR__)
  ]
</code></pre>
<p>It does look like <code>priv/static/assets/css/tailwind.css</code> is getting updated, but I’m not sure if there are issues related to <code>assets/js/app.js</code> vs <code>priv/static/assets/js/app.js</code>.  So, ignore that if it’s unrelated, I just wanted to mention it in case it is related.</p>
<p>Oh, and I forgot to mention, in an earlier post, that I removed <code>@tailwind base;</code> from <code>assets/css/app.css</code> (to prevent it from stomping on bootstrap), but I do have both of these included: <code>@tailwind components;</code> and <code>@tailwind utilities;</code></p>
<p>Also, I’ve corrected <code>focusElemnt</code> to <code>focusElement</code> in the .ts file.</p>
<p>Thanks for the help.  I’ll go work on deploying a staging environment, in case the details above don’t reveal the source of my troubles.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281525" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-281525" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281525"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="281556" data-post-id="281556">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="shakesmonos" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  shakesmonos
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/caspg" rel="nofollow">@caspg</a> ,  Following up on my previous reply:</p>
<p>Ok, the staging site is up. The search bar on this page:</p>
<p><a href="https://mono-phoenix-staging.herokuapp.com/plays" class="onebox" target="_blank" rel="noopener nofollow ugc">https://mono-phoenix-staging.herokuapp.com/plays</a></p>
<p>I have only added the search to that page currently (turned out I needed to put it in templates other than <code>app.html.heex</code>, so just trying to get it working on <code>/plays</code> first.)</p>
<p>On a possibly related note, I keep wondering about this, so I should ask:  Is this the only socket I need in my <code>lib/mono_phoenix_v01_web/endpoint.ex</code>?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">socket("/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]])
</code></pre>
<p>Will that socket handle the search too, or do I need to add another for the search?</p>
<p>Anyway, thanks for helping me try to find the cause of the <code>Parameters: :not_mounted_at_router</code> and `unknown hook found for “SearchBar” issues!</p>
<p>Please let me know if I should post the contents of any other files.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="281556" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-search-with-phoenix-liveview-and-tailwind/53761/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-281556" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="281556"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/53761/load_more?page=3">Load more posts (8 remaining)</a>
</div></template></turbo-stream>