title: Select2 disable/enable specific option
body: <p>I have a list which is of type select2.</p>
  <pre><code>&lt;select id=&quot;list&quot; class=&quot;form-control select2 select2-hidden-accessible&quot; tabindex=&quot;-1&quot; aria-hidden=&quot;true&quot;&gt;
  &lt;optgroup label=&quot;Types&quot;&gt;
  &lt;option value=&quot;None&quot;&gt;None&lt;/option&gt;
  &lt;option value=&quot;1&quot;&gt;One&lt;/option&gt;
  &lt;option value=&quot;2&quot;&gt;Two&lt;/option&gt;
  &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>
  <p>I want to disable option which is having <strong>value=1</strong>
  so I did like this</p>
  <pre><code>$(&quot;#list&gt;optgroup&gt;option[value='1']&quot;).prop('disabled',true);
     Result:// &lt;option value=&quot;1&quot; disabled&gt;One&lt;/option&gt;
  </code></pre>
  <p>It is working fine;but if i want to re-enable disabled option i tried below codes but still the select2 option is disabled.</p>
  <pre><code>$(&quot;#list&gt;optgroup&gt;option[value='1']&quot;).prop('disabled',false);
  $(&quot;#list&gt;optgroup&gt;option[value='1']&quot;).removeProp('disabled');
    Result://   &lt;option value=&quot;1&quot;&gt;One&lt;/option&gt;
  </code></pre>
  <p>but strange is disabled property of the option is removed. but the select2 option remains disabled.</p>
  <p>Not getting how to resolve this. Need help.</p>
  <p>Update: If I check DOM of select2 it is having this property even after removing disabled.</p>
  <pre><code>&lt;li class=&quot;select2-results__option&quot; id=&quot;select2-template-type-list-result-4qd3-merge&quot; role=&quot;treeitem&quot; aria-disabled=&quot;true&quot;&gt;One&lt;/li&gt;
  </code></pre>
  <p>if i make <strong>aria-disabled=&quot;false&quot;</strong> it will enable. not able to get what is the cause.</p>