0

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"
GF. Service
  • 108
  • 1
  • 8
  • On Click listener for the Label: http://stackoverflow.com/questions/39663871/extjs-tagfield-how-to-close-its-list-by-clicking-on-its-label-in-ie11/39916588#39916588 – GF. Service Oct 07 '16 at 12:18

1 Answers1

0

[SOLUTUION]: "OnClick"-listener for the label of the tagfield:

Extjs Tagfield: How to close its list by clicking on its label in IE11?

[Old Workaround]: I found a Solution to edit the for-Attribute. You can edit the Value with

inputId: "myTagfieldIsNotSelectWhenIpressOnTheLabel"

This is a workaround when customer press on a Label of a Extjs Tagfield and the Field should close.

Community
  • 1
  • 1
GF. Service
  • 108
  • 1
  • 8