Results 1 to 3 of 3

Thread: filter validateRecord property

  1. #1
    Sencha User
    Join Date
    Jan 2017
    Posts
    2

    Default filter validateRecord property

    I would like to customize the way a column filter works, or decide if the input is valid / which characters are allowed.

    I found a post referencing a filter property "validateRecord" which allowed just that, but I believe it does NOT exist in ExtJs 6.

    Is there a way to achieve that now?


    Thanks

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi--,

    Thanks for the info so far. Are you using a string filter and would like to customize what the filter does with it? Also, if you have a Fiddle so far of what you tried I'd be happy to take a look.

    Best!
    Bryan

  3. #3
    Sencha User
    Join Date
    Jan 2017
    Posts
    2

    Default

    I found and modified string filter no problem. However, I would also like this ability for numeric/number filters. However the client-side input sanitization only allows something like /^-?\d+\<decimal>?\d*$/ , or just numbers. I believe in previous versions of ExtJs 'validateRecord' could be overridden to allow other characters. Other properties and configuration settings which sound promissing, e.g.: regex, acceptedChars, do not override the sanitization I mentioned earlier. Here is a non functional example of failed attempts, it may give you context clues:

    Code:
    getGridColumnFilter: {
                    type:'numeric', 
                    dataIndex:field.key,
                    itemDefaults:{
                        validation:false,
                        regex:/.*/,
                        validator:  function(val){
                            console.log(val);
                            console.log(this);
                            return true;
                        }                
                    }
            };
    Thanks

Similar Threads

  1. Is there any to add a listener to the filter date property
    By tsensuous.grace in forum Ext: Q&A
    Replies: 5
    Last Post: 22 Jun 2016, 1:46 PM
  2. Replies: 3
    Last Post: 29 Jun 2015, 10:56 PM
  3. Replies: 10
    Last Post: 25 Jun 2015, 11:17 AM
  4. Replies: 3
    Last Post: 3 Feb 2015, 6:53 AM
  5. Filter twice on the same store property?
    By MrBeef in forum Sencha Touch 2.x: Q&A
    Replies: 4
    Last Post: 27 May 2012, 12:59 PM

Tags for this Thread

Posting Permissions

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