Results 1 to 2 of 2

Thread: Ext.form.field.Text breaks if the triggers-config is set via its property

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Sep 2011

    Default Ext.form.field.Text breaks if the triggers-config is set via its property

    See this fiddle

    When defining the triggers-config inside initComponent via its property the field breaks. Using setTriggers makes this work ...

  2. #2
    Sencha - Sustaining Engineer tristan.lee's Avatar
    Join Date
    Mar 2015
    Central Ohio


    You should define this on the class definition as a config:
    Ext.define('TheFoobar', {
        extend: 'Ext.form.field.Text',
        triggers: {
            foo: {
                cls: 'my-foo-trigger',
                handler: function () {
                    console.log('foo trigger clicked');
            bar: {
                cls: 'my-bar-trigger',
                handler: function () {
                    console.log('bar trigger clicked');
    Or if you insist on doing it inside initComponent, you'll need to call the setter. In either case, the configurator will call applyTriggers which does much more processing that simple setting the property inside initComponent where it is not processed.
    Tristan Lee
    Sencha Inc - Sustaining Engineer

    Having an issue? Help us help you - be detailed; provide some code; demonstrate with a fiddle (

    Embed your fiddle in your post: [FIDDLE]id[/FIDDLE]

Similar Threads

  1. Form field validation triggers
    By stevo.zilik in forum Ext: Discussion
    Replies: 1
    Last Post: 20 Nov 2012, 1:50 PM
  2. Replies: 2
    Last Post: 2 Sep 2012, 10:53 PM
  3. form field validator triggers
    By stimpy in forum Ext: Q&A
    Replies: 7
    Last Post: 2 Jul 2012, 7:06 AM
  4. afterRender breaks Ext.form.Field value
    By vayumahesh in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 28 Oct 2008, 8:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts