View Full Version : reset not working in combo combobox

12 Aug 2009, 12:42 AM
I have a combo like that:

var storeSiteWideFontSize = new Ext.data.SimpleStore({
{name:'text', type:'string'},
{name:'value', type:'int'},
{name:'fontfamily', type:'string'}

id: 'comboSectionFontSize',
xtype: 'combo',
editable: false,
store: storeSiteWideFontSize,
emptyText:'Click to Select...',
displayField: 'text',
typeAhead: true,
triggerAction: 'all',
mode: 'local',
valueField: 'value',
forceSelection: true,
tpl:new Ext.XTemplate(
'<tpl for="."><div class="x-combo-list-item" style="font-family:{fontfamily};font-size:{text}">{text}</div></tpl>'

I use this combo for selection of font-size.
But when I try to reset this field (try to display nothing, only empty text).


It shows "xx-small".

I try to comment it out: "forceSelection: true", but doesn't work...

Is it normal? Or do I miss something again... ?

Thanks for your help.

12 Aug 2009, 12:51 AM
As per the doc says, reset()

Resets the current field value to the originally-loaded value and clears any validation messages. Also adds emptyText and emptyClass if the original value was blank.

you may try clearValue().

12 Aug 2009, 1:01 AM
Dear Jarlau,

I give up to show empty text.

clearValue is also enough for me.

This is the second time to help me.
Thanks a lot.

12 Aug 2009, 3:16 AM
Configure it with value: ''

12 Aug 2009, 3:37 AM
Dear Animal,

But in that case when first rendered I saw "xx-small" (with gray color).
So I need to call clearValue() after render if I use value config.

Thanks for your reply.