By default a tagfield cannot be closed when clicking on its field label, so if there is a form full of tag fields it's hard to find a sweet spot where you can click without expanding one of them.
I'd like to keep the triggerOnClick behavior when it expands whenever you click on the field itself. Is there a way to just make its label collapse the expanded field (something better than wrapping label-less field into a container with a label).
xtype: 'tagfield'
fieldLabel: 'Tags',
queryMode: 'local',
triggerAction: 'all',
forceSelection: true,
editable: true,
anyMatch: true,
valueField: 'id',
displayField: 'name',
triggerOnClick: true,
store: store,
https://fiddle.sencha.com/#fiddle/17or
There ist a work around with labelableRenderTpl and for. How do I insert it to my code?
xtype: 'tag',
reference: 'mytagfield',
displayField: 'name',
valueField: 'id',
store: {type: 'laws'},
disabled: true,
bind: {
fieldLabel: '{i18n.law}',
blankText: '{i18n.mandfield}'
}
HTML Code looks like this:
<label id="mytagfield-labelEl" data-ref="labelEl" class="x-form-item-label x-form-item-label-default x-unselectable" style="padding-right:5px;width:205px;" for="mytagfield-inputEl">
I want to remove:
for="mytagfield-inputEl"