Aug 31, 2020, 2:55 AM
[OPEN] [#1825] setNote fails when no note is originally set
Hi
define a simple NumberField
on page load, set a note on that NumberField via App.test.setNote('test')
you will find a JS error because me.noteEl is null.
Note="test123"
then i can properly call App.test.setNote('new note')
pls fix
thanks
/Z
define a simple NumberField
<ext:NumberField ID="test"
runat="server"
FieldLabel="Amount"
DataIndex="amount"
IndicatorText="*"
AllowBlank="false"
Width="375"
AllowDecimals="true"
Padding="5"
IndicatorCls="red-text"
MaxLength="15">
notice that there is NO Note attribute set.on page load, set a note on that NumberField via App.test.setNote('test')
you will find a JS error because me.noteEl is null.
setNote: function (t, encode) {
var me = this,
oldHeight;
me.note = t;
if (me.rendered) {
oldHeight = me.noteEl.getHeight();
me.noteEl.dom.innerHTML = encode !== false ? Ext.util.Format.htmlEncode(t) : t;
if (me.noteEl.getHeight() !== oldHeight) {
me.updateLayout();
}
}
},
if i define the Note object on the NumberField in markup viaNote="test123"
then i can properly call App.test.setNote('new note')
pls fix
thanks
/Z