Problem:
When setting a null value of a property on a form with allowEmptyValue:true than not null is displayed, but the defaultValue.
Example (can be pasted in example editor):
Possible solution:
in ISC_Forms.js@23923: this.setValue() is called in method _showValueAfterDraw.
Don't know why this should be called if _value == null, but anyway a solution could be:
this.setValue(undefined,this.allowEmtpyValue);
When setting a null value of a property on a form with allowEmptyValue:true than not null is displayed, but the defaultValue.
Example (can be pasted in example editor):
Code:
isc.DataSource.create({
ID:"Test",
fields:[{name:"country",defaultValue:1,allowEmptyValue:true}]
})
var form = isc.DynamicForm.create({
dataSource:"Test",
fields: [
{ name:"country"}
]
});
isc.ask("Set to null?",function(){
form.editRecord({country:null});
isc.say("Value is not updated to null");
})
in ISC_Forms.js@23923: this.setValue() is called in method _showValueAfterDraw.
Don't know why this should be called if _value == null, but anyway a solution could be:
this.setValue(undefined,this.allowEmtpyValue);
Comment