Tuesday, 16 August 2016

How to add clear trigger to textfield


Hello all,

Today i would like to post the basic textfield enhancements in extjs. How to add the Clear trigger icon to textfield.

Below is the code to add triggers to textfield, we can multiple triggers like clear, search icon aswell.

                  {
                        xtype: 'textfield',
                        fieldLabel: 'Search',
                        triggers: {
                            clear: {
                                cls: 'x-form-clear-trigger',
                                handler:function(field) { field.reset(); }
                            }
                        }
                    }


OutPut




No comments:

Post a Comment