Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I keep OPTION classes with Ext.form.ComboBox in ExtJS?
    primarykey
    data
    text
    <p>When using Google's site translator widget, you have the option of putting a "notranslate" class on HTML elements that should be left untranslated. I've applied these to individual OPTION elements of a SELECT element where some of the options should be translated and others shouldn't, but when I call Ext.form.ComboBox(), the classes on individual OPTION elements are not carried over.</p> <p>I need to make something like this:</p> <pre><code>&lt;select&gt; &lt;option&gt;Please choose your team:&lt;/option&gt; &lt;option class="notranslate"&gt;1983 Los Angeles Dodgers&lt;/option&gt; &lt;option class="notranslate"&gt;1983 Atlanta Braves&lt;/option&gt; &lt;select&gt; </code></pre> <p>get turned into this:</p> <pre><code>&lt;!-- note the class "notranslate" --&gt; &lt;div class="x-layer x-combo-list " id="..." style="..."&gt; &lt;div class="x-combo-list-inner" id="..." style="..."&gt; &lt;div class="..."&gt;&lt;font&gt;&lt;font&gt;Please choose your team:&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;div class="... notranslate"&gt;&lt;font&gt;&lt;font&gt;1983 Los Angeles Dodgers&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;div class="... notranslate"&gt;&lt;font&gt;&lt;font&gt;1983 Atlanta Braves&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;/div&gt; </code></pre> <p></p> <p>Any ideas?</p> <p><strong>Updated with more information</strong> I am using version 3.4, and this is the code I currently have in place:</p> <pre><code>var teamChoice = new Ext.form.ComboBox({ typeAhead: true, triggerAction: 'all', transform: 'teamChoice', width: 300, forceSelection: true }); </code></pre> <p>I've seen the listClass option, but it seems to apply to all list items. In my scenario, I would like to apply the class only to the list items that already have the "notranslate" class on the original OPTION element.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload