[CLOSED] [#504] Custom Field for Filter Header not working

  1. #1

    [CLOSED] [#504] Custom Field for Filter Header not working

    https://examples2.ext.net/#/GridPane.../Custom_Field/

    In the above example, the drop down [Filter] for "size" is not retrieving correct results.
    For Example, If i select "Extra Large" in drop down then it is displaying results of "Large" .
    I guess TWO WORD filter is not working . The same scenario is occurring in our application
    Could u please check and respond accordingly
    Last edited by Daniil; Jun 09, 2014 at 10:12 AM. Reason: [CLOSED]
  2. #2
    Hi @iansriley,

    Thank you for the report.

    Please change the getSizeValue function to (on the page):
    function getSizeValue() {
        var text = [];
    
        this.menu.items.each(function (item) {
            if (item.checked) {
                text.push(item.text);
            }
        });
    
        if (text.length == 0) {
            return "";
        } else {
            return "any " + text.join(",");
        }
    }
    Also please change the getValue function to (in custom_behaviour.js):
    getValue: function (value) {
        var values = Ext.net.FilterHeader.behaviour.getStrValue(value).substring(4).split(","),
            tmp = [];
    
        console.log(value);
    
        Ext.each(values, function (v) {
            v = v.trim();
            if (!Ext.isEmpty(v)) {
                tmp.push(v);
            }
        });
    
        values = tmp;
    
        return { value: values, valid: values.length > 0 };
    }
  3. #3
    It has been fixed online and in SVN (revision #5863).

Similar Threads

  1. GridPanel printing bug with filter header
    By brunweb in forum 2.x Help
    Replies: 7
    Last Post: Sep 30, 2014, 2:25 PM
  2. Replies: 1
    Last Post: Mar 20, 2013, 4:18 PM
  3. Remote filter for Header Filter
    By huzzy143 in forum 1.x Help
    Replies: 2
    Last Post: May 09, 2012, 3:43 PM
  4. filter above grid header
    By rnachman in forum 1.x Help
    Replies: 1
    Last Post: Feb 08, 2011, 9:01 PM
  5. Replies: 2
    Last Post: Feb 17, 2010, 9:47 AM

Posting Permissions