Select2 allows to select "wrong item" when populating items with ajax
<p>Please check the image attached</p>
<p>I'm working with select2 4.0 and am populating items into the select by using ajax calls. All is working fine. I can do incremental search and this speeds a lot.</p>
<p><strong>The problem is that select2 allows user to select this &quot;temporary item&quot; generated dynamically from what user writes in the box...</strong></p>
<p>Does anyone know how should I disable selection of this item? Or at least validate in the button click that this item should not be selected...</p>
<p><a href="https://i.stack.imgur.com/Ees45.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ees45.jpg" alt="enter image description here" /></a></p>