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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="renews" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/renews/120/3427_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  renews
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Awesome work!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318925" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/82">Post #81</a>
	                </div>
	            </div>
              <div id="likers-container-318925" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318925"
                     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 #81"></div>
  </section>
</div>
    <div class="postbit" id="321411" data-post-id="321411">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="trisolaran" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/120/23748_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  trisolaran
                    <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">
								<h2><a name="p-321411-version-140-released-with-support-for-associationsembeds-handshake-1" class="anchor" href="#p-321411-version-140-released-with-support-for-associationsembeds-handshake-1" aria-label="Heading link" rel="nofollow"></a>Version 1.4.0 released with support for associations/embeds <img src="https://forum.elixirforum.com/images/emoji/apple/handshake.png?v=15" title=":handshake:" class="emoji" alt=":handshake:" loading="lazy" width="20" height="20"></h2>
<p><a href="https://hex.pm/packages/live_select" rel="nofollow">This latest release</a> includes support for displaying and selecting associations and embeds using <code>LiveSelect</code>.</p>
<p>This is something quite a few folks were trying to do, and were experiencing considerable frustration in the process. Not surprisingly! <code>LiveSelect</code> was designed to work well with simple values like strings and numbers, and although it was able to encode arbitrary values in its <code>options</code>, it wasn’t able to deal with complex values or changesets from a form.</p>
<p>Now this has changed, and users should be able to deal with associations/embeds with only minimal hassle. <a href="https://hexdocs.pm/live_select/LiveSelect.html#module-using-liveselect-with-associations-and-embeds" rel="noopener nofollow ugc">This section in the docs</a> explains how to do it with the help of an example.</p>
<p>As usual, feedback is very welcome! Please do open an issue if anything is weird/doesn’t work/could be improved <img src="https://forum.elixirforum.com/images/emoji/apple/chart_with_upwards_trend.png?v=15" title=":chart_with_upwards_trend:" class="emoji" alt=":chart_with_upwards_trend:" loading="lazy" width="20" height="20"></p>
<p>Thanks again to everyone who used this component! <img src="https://forum.elixirforum.com/images/emoji/apple/pray.png?v=15" title=":pray:" class="emoji" alt=":pray:" loading="lazy" width="20" height="20">  <img src="https://forum.elixirforum.com/images/emoji/apple/tada.png?v=15" title=":tada:" class="emoji" alt=":tada:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="321411" data-batch-url="/posts/batch_likers">
                        11
                      </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/liveselect-dynamic-selection-input-component-for-liveview/49538/83">Post #82</a>
	                </div>
	            </div>
              <div id="likers-container-321411" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="321411"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-most-liked cat-most-liked" title="One of the top 3 liked posts in this thread!"></div>
  </section>
</div>
    <div class="postbit" id="344078" data-post-id="344078">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve just stumbled onto <code>live_select</code> and am trying to use it instead of a <code>select</code> control in situations where there are many linked entities in a LiveView app.</p>
<p>I was wondering: when there is an entity selected, and the control is subsequently <code>focus</code>ed again, the input field goes blank. Is this by design, or is something wrong happening in my instance?</p>
<p>It isn’t a show-stopping issue in the <em>create</em> view, as loss of focus (the <code>blur</code> event) returns the value/id, but in the <em>update</em> view, the value (and id) are removed, but not reinstated.</p>
<p>The chain of messages in the console in the first instance is:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[debug] HANDLE EVENT "focus" in KlepsidraWeb.JournalEntryLive.Index
  Component: LiveSelect.Component
  Parameters: %{"value" =&gt; "London, England - United Kingdom"}
[debug] HANDLE EVENT "blur" in KlepsidraWeb.JournalEntryLive.Index
  Component: LiveSelect.Component
  Parameters: %{"value" =&gt; ""}
</code></pre>
<p>Whereas, in the second instance, clicking on the <em>edit</em> button and opening the same <code>form_component</code> with existing data, returns:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[debug] HANDLE EVENT "focus" in KlepsidraWeb.JournalEntryLive.Index
  Component: LiveSelect.Component
  Parameters: %{"value" =&gt; "Pavlodar, Pavlodar Region - Kazakhstan"}
[debug] HANDLE EVENT "change" in KlepsidraWeb.JournalEntryLive.Index
  Component: LiveSelect.Component
  Parameters: %{"_target" =&gt; ["journal_entry", "location_id_text_input"], "journal_entry" =&gt; %{"location_id_text_input" =&gt; ""}}
[debug] HANDLE EVENT "blur" in KlepsidraWeb.JournalEntryLive.Index
  Component: LiveSelect.Component
  Parameters: %{"value" =&gt; ""}
</code></pre>
<p>Is this expected behaviour? I am using the latest <code>live_select</code>, 1.4.2, and have had to update to <code>phoenix_html</code> 4.1.0 to be able to update <code>live_select</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="344078" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/84">Post #83</a>
	                </div>
	            </div>
              <div id="likers-container-344078" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344078"
                     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 #83"></div>
  </section>
</div>
    <div class="postbit" id="344087" data-post-id="344087">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="trisolaran" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/120/23748_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  trisolaran
                    <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">
								<aside class="quote no-group" data-username="devilray" data-post="84" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/48.png" class="avatar"> devilray:</div>
<blockquote>
<p>I was wondering: when there is an entity selected, and the control is subsequently <code>focus</code>ed again, the input field goes blank. Is this by design, or is something wrong happening in my instance?</p>
</blockquote>
</aside>
<p>It’s by design. It gives you the ability to change the selection.</p>
<aside class="quote no-group" data-username="devilray" data-post="84" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/48.png" class="avatar"> devilray:</div>
<blockquote>
<p>It isn’t a show-stopping issue in the <em>create</em> view, as loss of focus (the <code>blur</code> event) returns the value/id, but in the <em>update</em> view, the value (and id) are removed, but not reinstated.</p>
</blockquote>
</aside>
<aside class="quote no-group" data-username="devilray" data-post="84" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/48.png" class="avatar"> devilray:</div>
<blockquote>
<p>Whereas, in the second instance, clicking on the <em>edit</em> button and opening the same <code>form_component</code> with existing data, returns:</p>
</blockquote>
</aside>
<p>Hard for me to follow cause I don’t know what these “create” or “update” views are, or what the “edit” button is. You’re talking about code I cannot see. Please <a href="https://github.com/maxmarcon/live_select/issues/new/choose" rel="noopener nofollow ugc">create a bug report</a> and describe the example in detail. The best thing to do is to add a small example repo so I can reproduce the issue, that will greatly reduce the time to a bugfix, if one is required. Thanks</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="344087" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/85">Post #84</a>
	                </div>
	            </div>
              <div id="likers-container-344087" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344087"
                     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 #84"></div>
  </section>
</div>
    <div class="postbit" id="344105" data-post-id="344105">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thank you for the quick reply.</p>
<p>I apologise for the misunderstanding I caused: when referring to “create” and “update” views, I was referring to CRUD terminology, or the view presented by the <code>form_component.ex</code> live component, as a form for creating <em>new</em> entities, or for editing/updating <em>existing</em> entities, as created by default LiveView generators.</p>
<p>You’re right in your suggestion, and I’m now creating a small repository to demonstrate the problem I’ve been having. I’ll open a detailed bug report with a link to this, as suggested.</p>
<p>Thanks again <a class="mention" href="/u/trisolaran" rel="nofollow">@trisolaran</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="344105" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/86">Post #85</a>
	                </div>
	            </div>
              <div id="likers-container-344105" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344105"
                     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 #85"></div>
  </section>
</div>
    <div class="postbit" id="344235" data-post-id="344235">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/trisolaran" rel="nofollow">@trisolaran</a>, I have now opened a bug report (<a href="https://github.com/maxmarcon/live_select/issues/86" class="inline-onebox" rel="noopener nofollow ugc">LiveSelect wipes out the underlying value when focus is received · Issue #86 · maxmarcon/live_select · GitHub</a>), with a quick GIF and a minimal repository, describing this issue in detail.</p>
<p>By the way, I really love <code>live_select</code>, and can’t wait to start using it as a serious <code>select</code> element replacement! Is there any way to modify this behaviour of clearing the input field, while showing the dropdown with the current choice highlighted? I’m thinking of how not to <em>surprise</em> users by clearing the choice, however brief this interruption may be.</p>
<p>Thanks for the fantastic work.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="344235" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/87">Post #86</a>
	                </div>
	            </div>
              <div id="likers-container-344235" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344235"
                     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 #86"></div>
  </section>
</div>
    <div class="postbit" id="344276" data-post-id="344276">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="trisolaran" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/120/23748_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  trisolaran
                    <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>Hey <a class="mention" href="/u/devilray" rel="nofollow">@devilray</a>, thanks for the repo and the bug report - while running your repo, I realized that this bug <a href="https://github.com/maxmarcon/live_select/pull/82" rel="noopener nofollow ugc">had already been reported and fixed</a>. I just hadn’t released a new version, which <a href="https://hex.pm/packages/live_select/1.4.3" rel="nofollow">I did just now</a>.</p>
<p>Sorry for wasting your time, I had forgotten about that bugfix. Next time it’s a good idea to check the <a href="https://github.com/maxmarcon/live_select/blob/main/CHANGELOG.md" rel="noopener nofollow ugc">changelog</a>, as it contains all the changes, even unrelased ones, and also try against the latest main.</p>
<blockquote>
<p>Is there any way to modify this behaviour of clearing the input field, while showing the dropdown with the current choice highlighted?</p>
</blockquote>
<p>How do you picture that exactly? the user has to be able to change the selection, and to do that, they have to be able to type in the input field. Hard to imagine how they can do that if the text of the selection stays in the input field.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="344276" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/88">Post #87</a>
	                </div>
	            </div>
              <div id="likers-container-344276" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344276"
                     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 #87"></div>
  </section>
</div>
    <div class="postbit" id="344289" data-post-id="344289">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a class="mention" href="/u/trisolaran" rel="nofollow">@trisolaran</a>, I saw you closing the issue, and have already updated to <code>live_select</code> 1.4.3, and it works beautifully! Thank you very much for that, and yes, I will look into past issues in the future, sorry.</p>
<blockquote>
<p>How do you picture that exactly? the user has to be able to change the selection, and to do that, they have to be able to type in the input field. Hard to imagine how they can do that if the text of the selection stays in the input field.</p>
</blockquote>
<p>I realise what you’re saying, and part of me agrees with your design decision.</p>
<p>However, I feel that—and this is subjective, I know—to follow the <em>principle of least astonishment</em>, it would be better to keep the current input intact, and use the fact that you have already provided the <code>allow_clear</code> option to deal with exactly the problem you describe above—clicking the ‘x’ icon will clear the input. This also seems to me to follow the standards set by comboboxes since Mac OS and Windows development environments established in the 90s: clicking the ‘expand’ arrow opened the options, with the current result left in place, and it and its neighbouring options shown in the dropdown selections.</p>
<p>Another reason to do this is that the suddenness of the change may result in making the user apprehensive to touch the field, hurting UX. Finally, it feels like it could also be an accessibility problem.</p>
<p>I provide a few compelling examples of exactly this in action (to varying degrees of user-friendliness), taken from popular sites on the internet:</p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/f/d/fd98d66b700b8aaa4767c6e089a7068d9c322818.gif" alt="Auto_complete_select-turkishairlines.com" data-base62-sha1="AbqfGCbWqBGcSaZQf4AnWMFgyHm" width="690" height="452" class="animated"></p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/2/3/23aa5b5f4b45d0055d8b61f328e100d78d5487e9.gif" alt="Auto_complete_select-easyjet.com" data-base62-sha1="55vHmPWHioEXiIGs5NkvbNQq15v" width="640" height="420" class="animated"></p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/9/9/99bf3fa6bb6426c004daa5cdceaeff377b08c885.gif" alt="Auto_complete_select-spanishdictionary.com" data-base62-sha1="lW6NGbbk78r2uvelJXW6TlSw0Fn" width="690" height="452" class="animated"></p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/9/1/913abcd4ab646b7aa0e6fcc96e2c3b2726c8d8c8.gif" alt="Auto_complete_select-cloudclusters.com" data-base62-sha1="kIL4PMbwQxZqi4xMIMCiWlLOm92" width="690" height="451" class="animated"></p>
<p>And another, a jQuery select component, which takes a completely different approach, but does the same thing effectively:</p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/8/b/8bca334069f1fc8bc57b0cd1ce1e67159400387f.gif" alt="Auto_complete_select-select2.org" data-base62-sha1="jWDzYM2EMvYxig1HXitTifeeeMn" width="690" height="576" class="animated"></p>
<p>Sorry I uploaded so many examples, but I feel that each is subtly different, promoting a different way of doing the same thing. One thing that is very good is that some of them, when clicked/focused for a second time, automatically highlight the currently selected option—in addition to keeping it in the search box—which, it seems would be very easy to do in <code>live_select</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="344289" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/89">Post #88</a>
	                </div>
	            </div>
              <div id="likers-container-344289" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="344289"
                     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 #88"></div>
  </section>
</div>
    <div class="postbit" id="345086" data-post-id="345086">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="trisolaran" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/120/23748_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  trisolaran
                    <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>Hi <a class="mention" href="/u/devilray" rel="nofollow">@devilray</a> and thank you for the very elaborate message and all the examples.</p>
<aside class="quote no-group" data-username="devilray" data-post="89" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/48.png" class="avatar"> devilray:</div>
<blockquote>
<p>it would be better to keep the current input intact, and use the fact that you have already provided the <code>allow_clear</code> option to deal with exactly the problem you describe above—clicking the ‘x’ icon will clear the input.</p>
</blockquote>
</aside>
<p>The <code>allow_clear</code> option gives you a way to clear the selection - when you click on the <code>x</code> icon, your selected option is lost - whereas what I was talking about is giving the user a way to change the selection while not forgetting the current one (even though, as you pointed out, the selection is not visible anymore, and this might not be what most users expect) so that if the user decides to “abort the search”, the current selection is restored. This is how LiveSelect behaves by default.</p>
<aside class="quote no-group" data-username="devilray" data-post="89" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/d/b4bc9f/48.png" class="avatar"> devilray:</div>
<blockquote>
<p>Another reason to do this is that the suddenness of the change may result in making the user apprehensive to touch the field, hurting UX. Finally, it feels like it could also be an accessibility problem.</p>
</blockquote>
</aside>
<p>100% point taken, there are certainly better/different ways of implementing this functionality.<br>
The <code>select2</code> approach seems particularly compelling to me, and they can do that because they have an additional text input field appearing below the selection.</p>
<p>I’m very open to include this approach (or another one that offers similar functionality/UX) as an additional input mode to LiveSelect, so if you’re interested in contributing, feel free to.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="345086" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/90">Post #89</a>
	                </div>
	            </div>
              <div id="likers-container-345086" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="345086"
                     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 #89"></div>
  </section>
</div>
    <div class="postbit" id="345267" data-post-id="345267">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Hi <a class="mention" href="/u/trisolaran" rel="nofollow">@trisolaran</a>, thank you for the detailed clarification.</p>
<p>I will look into this more deeply over the coming couple of weeks, first I’m trying to completely understand the code in <code>live_select</code> before I do anything further.</p>
<p>As soon as I’m on top of it, I would like to contribute to this and would like to discuss one approach which seems extremely functional to me, taken from the Frappe framework which underpins ERPNext, an open-source ERP:</p>
<p><img src="https://forum.elixirforum.com/uploads/default/original/3X/e/c/ec42654248528900db138feddd26772ed4955c40.gif" alt="ERPNext_combo_control" data-base62-sha1="xI2VXrMO1PINrsUz9wT5wZPuRu8" width="550" height="446" class="animated"></p>
<p>What’s the best way to discuss some of these choices, here, on GitHub, or another channel?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="345267" 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/liveselect-dynamic-selection-input-component-for-liveview/49538/91">Post #90</a>
	                </div>
	            </div>
              <div id="likers-container-345267" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="345267"
                     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 #90"></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/49538/load_more?page=10">Load more posts (17 remaining)</a>
</div></template></turbo-stream>