PDA

View Full Version : Where to specify revertInvalid in config?



siebe vos
11 Nov 2011, 7:16 AM
In the celleditor (grid plugin) I don't want the field value to return to it's valid value when moving to another field / row and the field value was invalid.

From the docs I understand that revertInvalid should prevent this. When debugging Ext.Editor I can see in the completeEdit method that when revertInvalid is false the field value in untouched. My question is where to set this config param (Ext 4.0.7)? I tried to specify this param in the:

grid's column config
grid's column editor config
grid config,
celleditor plugin config
But all without any result :((. Does anyone have a clue?

mitchellsimoens
11 Nov 2011, 6:20 PM
Doesn't look like you can by just specifying the editor as a simple config Object. You can if you do this (tested on 4.0.7 in the cell editing grid example):


editor : Ext.create('Ext.grid.CellEditor', {
editorId: 'availColumn',
revertInvalid : true,
field: Ext.create('Ext.form.field.Date', {
format: 'm/d/y',
minValue: '01/01/06',
disabledDays: [0, 6],
disabledDaysText: 'Plants are not available on the weekends'
})
})

siebe vos
12 Nov 2011, 5:35 AM
Thank you Mitchell!