Results 1 to 3 of 3

Thread: how clear text from SearchField.js

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
      0  

    Default how clear text from SearchField.js

    Hi, I am using exiting Search Field (examples ux form SearchField.js) .I want to clear the text from search text.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,385
    Answers
    3997
    Vote Rating
    1540
      0  

    Default

    Code:
    field.setValue('');
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    208
    Answers
    2
    Vote Rating
    0
      0  

    Red face

    thx Michael, I used the below piece of code , but still didn't work.
    Code:
        onTriggerClear: function(el) {        return function() {
                if(el.field.getValue()) {
                    el.field.setValue('');
                    el.field.focus();
                    el.onKeyUp();
                }
            }
        }
    but it didn't clear the text. should i use it separately ?

Posting Permissions

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