单击不同的按钮 sencha touch 触发 select 字段
Trigger select field on a click of a different button sencha touch
我是煎茶新手。
我尝试在基于 Sencha 的设计要求中单击不同的按钮来触发 selectfield,
{
"xtype": "container",
//"shrinkWrap": false,
//"width": "100%",
//"height": "100%",
style: {
//"padding-bottom": "5px",
},
"layout": {
"type": "hbox",
"align": "stretch"
},
"items": [
{
"xtype": "container",
"flex": 1,
"layout": {
"type": "hbox",
"align": "stretch"
},
"items": [
{
xtype: 'textfield',
placeHolder: 'Subject',
id: 'rejectSubject',
name: 'rejectSubject',
itemId: 'rejectSubject',
hidden: true,
//readOnly: true,
//width: "100%",
//columnWidth: 0.5
flex: 1,
},
{
xtype: 'button',
flex: 0.1,
style: {
'position': 'absolute',
'right': '5px',
'height': '35px',
'border': '0px none',
'background': ' #fff',
},
html: '<i class="fa fa-chevron-down" aria-hidden="true"></i>',
autoEl: {
tag: 'right'
},
handler: function () {
Ext.get('templateemail').dom.click();
}
},
{
xtype: 'selectfield',
//cls: 'field-border-right',
//label: 'Email ',
name: 'template_id',
itemId: 'template_id',
id: 'templateemail',
hidden: true,
listeners: {
change: function () {
if (this.getValue() > 0) {
// this.parent.down('label[name=templateError]').setHidden(true);
}
}
}
},
]
}
]
},
看起来像:
请帮帮我。
需要在选择字段
上使用showPicker()
showPicker( )
Shows the picker for the select field, whether that is a Ext.picker.Picker or a simple list.
Ext.getCmp('templateemail').showPicker();
我是煎茶新手。 我尝试在基于 Sencha 的设计要求中单击不同的按钮来触发 selectfield,
{
"xtype": "container",
//"shrinkWrap": false,
//"width": "100%",
//"height": "100%",
style: {
//"padding-bottom": "5px",
},
"layout": {
"type": "hbox",
"align": "stretch"
},
"items": [
{
"xtype": "container",
"flex": 1,
"layout": {
"type": "hbox",
"align": "stretch"
},
"items": [
{
xtype: 'textfield',
placeHolder: 'Subject',
id: 'rejectSubject',
name: 'rejectSubject',
itemId: 'rejectSubject',
hidden: true,
//readOnly: true,
//width: "100%",
//columnWidth: 0.5
flex: 1,
},
{
xtype: 'button',
flex: 0.1,
style: {
'position': 'absolute',
'right': '5px',
'height': '35px',
'border': '0px none',
'background': ' #fff',
},
html: '<i class="fa fa-chevron-down" aria-hidden="true"></i>',
autoEl: {
tag: 'right'
},
handler: function () {
Ext.get('templateemail').dom.click();
}
},
{
xtype: 'selectfield',
//cls: 'field-border-right',
//label: 'Email ',
name: 'template_id',
itemId: 'template_id',
id: 'templateemail',
hidden: true,
listeners: {
change: function () {
if (this.getValue() > 0) {
// this.parent.down('label[name=templateError]').setHidden(true);
}
}
}
},
]
}
]
},
看起来像:
请帮帮我。
需要在选择字段
上使用showPicker()
showPicker( )
Shows the picker for the select field, whether that is a Ext.picker.Picker or a simple list.
Ext.getCmp('templateemail').showPicker();