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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Can you expand on how the <code>options</code> assign works? Is this a set of options that will always be there, regardless the text you’ve typed in the text input field? Or will it be replaced as soon as you trigger the hook that returns options? Or is this set of options somehow searched through, and mixed with the options that are returned dynamically? Sorry for the lazy question, I know it’s all in flux right now…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="274538" 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/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-274538" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="274538"
                     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 #21"></div>
  </section>
</div>
    <div class="postbit" id="274541" data-post-id="274541">
  <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/linusdm" rel="nofollow">@linusdm</a> ! No worries, perfect timing in fact <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>
<blockquote>
<p>Is this a set of options that will always be there, regardless the text you’ve typed in the text input field? Or will it be replaced as soon as you trigger the hook that returns options?</p>
</blockquote>
<p>The latter</p>
<p>I just finished the changes to enable setting an initial selection, <a href="https://github.com/maxmarcon/live_select/issues/10" rel="noopener nofollow ugc">either implicitly from the form or explicitly with the value option</a>. It’s in master. Please try it out if you can. Any questions, comments, or bugs, please post them in the github issue. 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="274541" 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/23">Post #22</a>
	                </div>
	            </div>
              <div id="likers-container-274541" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="274541"
                     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 #22"></div>
  </section>
</div>
    <div class="postbit" id="274807" data-post-id="274807">
  <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-274807-published-033-1" class="anchor" href="#p-274807-published-033-1" aria-label="Heading link" rel="nofollow"></a>Published 0.3.3</h2>
<ul>
<li>set initial selection from the form or manually with <code>value</code> option</li>
<li>set initial list of available options with <code>options</code> option</li>
<li>add a <code>max_selectable</code> option to limit the maximum size of the selection</li>
</ul>
<p>Also deployed showcase app at: <a href="https://live-select.fly.dev/" rel="noopener nofollow ugc">https://live-select.fly.dev/</a> (thanks <a class="mention" href="/u/linusdm" rel="nofollow">@linusdm</a> for reminding me)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="274807" data-batch-url="/posts/batch_likers">
                        4
                      </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/24">Post #23</a>
	                </div>
	            </div>
              <div id="likers-container-274807" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="274807"
                     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 #23"></div>
  </section>
</div>
    <div class="postbit" id="275100" data-post-id="275100">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks for this library, it looks great.</p>
<p>I’d like to try if as a tagging interface as in <a href="https://fullstackphoenix.com/tutorials/tagging-interface-with-phoenix-liveview-and-tailwind-tagging-part-2" class="inline-onebox" rel="noopener nofollow ugc">Tagging interface with Phoenix LiveView and Tailwind - Tagging part 2 · FullstackPhoenix</a> - but there’s something missing to my understanding.</p>
<p>Can the user enter new values by pressing enter? I think that’s not possible currently.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="275100" 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/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-275100" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275100"
                     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 #24"></div>
  </section>
</div>
    <div class="postbit" id="275102" data-post-id="275102">
  <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">
								<blockquote>
<p>Can the user enter new values by pressing enter? I think that’s not possible currently.</p>
</blockquote>
<p>Yes it’s possible. You can either use the arrow keys to navigate to the entry in the dropdown and hit enter - or you can click on the entry. You can test this in the <a href="https://live-select.fly.dev/" rel="noopener nofollow ugc">showcase app</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="275102" 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/26">Post #25</a>
	                </div>
	            </div>
              <div id="likers-container-275102" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275102"
                     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 #25"></div>
  </section>
</div>
    <div class="postbit" id="275108" data-post-id="275108">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Thanks, but I still think it’s not possible to add new entries that are not in the original options, please see this video I recorded:</p>
          <div class="onebox video-onebox">
            <video width="100%" height="100%" controls="">
              <source src="https://dl.dropboxusercontent.com/s/i9wc3fdvzzrwa2f/live_select_add_new_tag.mov?raw=1">
              <a href="https://dl.dropboxusercontent.com/s/i9wc3fdvzzrwa2f/live_select_add_new_tag.mov?raw=1" rel="noopener nofollow ugc">https://dl.dropboxusercontent.com/s/i9wc3fdvzzrwa2f/live_select_add_new_tag.mov?raw=1</a>
            </video>
          </div>

<p>Here, in <code>:tags</code> mode, I can enter “Seattle” and select it as it’s in the options, but if I want to add a new one, like “Monreal”, I can’t add it to the list. Am I missing something?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="275108" 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/27">Post #26</a>
	                </div>
	            </div>
              <div id="likers-container-275108" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275108"
                     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 #26"></div>
  </section>
</div>
    <div class="postbit" id="275112" data-post-id="275112">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think it’s a matter of using <code>update_options</code> with the text from the <code>ChangeMsg</code> via <code>handle_info</code>, or just live updating the options.</p>
<p>I’ll see if I can get that done from the examples, 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="275112" 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/28">Post #27</a>
	                </div>
	            </div>
              <div id="likers-container-275112" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275112"
                     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 #27"></div>
  </section>
</div>
    <div class="postbit" id="275116" data-post-id="275116">
  <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="jaimeiniesta" data-post="27" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jaimeiniesta/48/1063_2.png" class="avatar"> jaimeiniesta:</div>
<blockquote>
<p>Am I missing something?</p>
</blockquote>
</aside>
<p>Nope, you’re very much correct. You can’t currently add new entries not present in the options. I misunderstood your original question, sorry.</p>
<p>So it would be something like a “dynamic option mode”, where if you hit enter whatever you have typed will become a new selected option. I think this is an interesting use case, at least another person mentioned it during a conversation.</p>
<p>If you could create an issue on github with a short description, that would be great! I’m sure it won’t be hard to implement.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="275116" 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/29">Post #28</a>
	                </div>
	            </div>
              <div id="likers-container-275116" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275116"
                     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 #28"></div>
  </section>
</div>
    <div class="postbit" id="275121" data-post-id="275121">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="trisolaran" data-post="29" data-topic="49538">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/trisolaran/48/23748_2.png" class="avatar"> trisolaran:</div>
<blockquote>
<p>If you could create an issue on github with a short description, that would be great! I’m sure it won’t be hard to implement.</p>
</blockquote>
</aside>
<p>Cool, I just created the issue <a href="https://github.com/maxmarcon/live_select/issues/11" class="inline-onebox" rel="noopener nofollow ugc">Add new option dynamically · Issue #11 · maxmarcon/live_select · GitHub</a></p>
<p>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="275121" 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/30">Post #29</a>
	                </div>
	            </div>
              <div id="likers-container-275121" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="275121"
                     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 #29"></div>
  </section>
</div>
    <div class="postbit" id="276535" data-post-id="276535">
  <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">
								<h1><a name="p-276535-version-040-is-out-1" class="anchor" href="#p-276535-version-040-is-out-1" aria-label="Heading link" rel="nofollow"></a>Version 0.4.0 is out</h1>
<p>Here’s the new stuff:</p>
<ul>
<li>a new<code>available_option_class</code> configuration option to style options that have not been selected yet</li>
<li>a new <code>user_defined_options</code> configuration option to allow users to enter any tag</li>
<li>ability to assign a custom id to the component</li>
<li>ability to programmatically clear the selection using the <code>clear</code> assign</li>
<li>a new <code>allow_clear</code> configuration option. If set, a tiny <code>x</code> button will appear in the text input in single selection mode. Clicking the button clears the selection.</li>
</ul>
<p><code>LiveSelect.update_options/2</code> has been deprecated in favor of using <code>LiveView.send_update/3</code> directly. This is the first step towards a planned version <code>1.0.0</code> , which will expose LiveSelect as a function component and use events instead of messages for the update loop. In this way it will be easier to use LiveSelect from within another live component, such as the form components created by the new <code>phx.gen.live</code> generators.</p>
<p>Thanks to <a class="mention" href="/u/jaimeiniesta" rel="nofollow">@jaimeiniesta</a> and <a class="mention" href="/u/kristerv" rel="nofollow">@KristerV</a> (plus 2 other GitHub users I can’t find here <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">) for their feedback and suggestions.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="276535" data-batch-url="/posts/batch_likers">
                        7
                      </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/31">Post #30</a>
	                </div>
	            </div>
              <div id="likers-container-276535" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="276535"
                     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 #30"></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=4">Load more posts</a>
</div></template></turbo-stream>