EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: fonzie on June 01, 2019, 08:57:59 AM



Title: Icons in combobox selection and selected.
Post by: fonzie on June 01, 2019, 08:57:59 AM
I'd like to have icons show in the combobox both when it's been selected and when choosing (eg in the dropdown choice).

If I hard code it like this it's possible

data: [
        {value:'RAL1001',text:'Green Beige',iconCls:'RAL1001'},
     {value:'RAL1002',text:'Sand Yellow',iconCls:'RAL1001'}
   ]

There's dozens of choices and they can change (depending upon stock levels), therefore i'd like to load the data from a datatbase or .json file, but whilst the Value and text fields are easy to populate, the "icon", doesn't work.

I've used the formatter function but this only works in the "drop down" choice, the icon isn't displayed after you've made a choice.

Can anyone help ?


Title: Re: Icons in combobox selection and selected.
Post by: jarry on June 03, 2019, 06:31:32 PM
Please refer to this topic https://www.jeasyui.com/forum/index.php?topic=4234.0