开发者

Readonly property on Field SenchaTouch

开发者 https://www.devze.com 2023-03-09 06:42 出处:网络
Hi i\'ve been looking for the readOnly property for field in secnhatouch but haven\'t found it... can some one assist me on this matter

Hi i've been looking for the readOnly property for field in secnhatouch but haven't found it... can some one assist me on this matter

{
   开发者_如何学Python              xtype: 'textfield',
                 name: 'ReferenceNumber',
                 readOnly:true,
                 label: 'Reference'
}


I ran into the same problem with readOnly: true not working - I was able to fix it by adding an afterrender listener:

{
    xtype: 'textfield',
    name: 'ReferenceNumber',
    label: 'Reference',
    listeners: {
        afterrender: function(ele) {
            ele.fieldEl.dom.readOnly = true;
        }
    }
}


I think you want the disabled field

{
    xtype: 'textfield',
    name: 'ReferenceNumber',
    **disabled**: true,
    value: '12312421',
    label: 'Reference'
}

I overload the 'disabledCls' because it grey's out the label more than i want.


I was able to fix this by setting readOnly: null or readOnly: undefined:

{
    xtype: 'textfield',
    name: 'Website',
    label: 'Website',
    readOnly: null
}
0

精彩评论

暂无评论...
验证码 换一张
取 消