0
votes

I have a texfield component to which I gave a trigger but I wanted it to be enabled only when the user types some input into the textfield whenever the user dont enter ant thing it should not enable the trigger icon. Could someone please help me out I am using Extjs 5.1. Here is the fiddle link https://fiddle.sencha.com/#view/editor&fiddle/1up3

1
@Theo can you please look into this ā€“ Imran

1 Answers

1
votes

You can hide the trigger if the field is empty:

listeners:{
    change:function(cb, nV) {
        cb.getTrigger('mytrigger').setVisible(!!nV);
    }
},
triggers: {
    mytrigger: {
        hidden:true,