Results 1 to 3 of 3

Thread: Extjs 6 grid column date/list filter object has menu property null

  1. #1
    Sencha User
    Join Date
    Mar 2008
    Posts
    79

    Default Extjs 6 grid column date/list filter object has menu property null

    I am trying to set filter value dynamically using filter setVaue function in ext 6.0.1, which only works for string filter type. For list type setValue doesn't work and i don't see any other method to make the selection

    menu property comes null for both list and date. We have to create menu first using filter.createMenu() now menu can be seen but still no way to make your item selected in menu.

    For list i had a workaround to loop trough all the menu items and checked the desired item. What should be the proper way to set filter value dynamically?

    But i am stuck with type date. I tried with{gt:mydate} and setValue(date), these is not working. This is bug or i am doing something wrong? any suggestion....

  2. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    901
    Answers
    105

    Default

    I don't know a "proper" way to do it, but here is hackish way to set date filter values:
    PHP Code:
    var filter grid.getColumns()[2].filterpicker;
    filter.createMenu();
    //The field identifier ('lt', 'gt', 'eq')
    picker filter.getPicker('eq');
    picker.setValue(new Date('2002-12-20'));
    filter.onMenuSelect(pickerpicker.getValue()); 

  3. #3
    Sencha User
    Join Date
    Apr 2013
    Posts
    901
    Answers
    105

    Default

    Here is a hackish solution for setting list filter values:
    PHP Code:
    var filter grid.getColumns()[2].filter;

    filter.value = [34];
    filter.filter.setValue([3,4]);

    filter.setActive(true);
    filter.updateStoreFilter(); 

Similar Threads

  1. Grid filter throws 'items' null error after sort any column
    By danigarcia254 in forum Ext JS 6.x Q&A
    Replies: 3
    Last Post: 23 Nov 2015, 12:50 PM
  2. regarding filter with null date value
    By amit.chudasama in forum Ext 5: Q&A
    Replies: 1
    Last Post: 13 Oct 2014, 3:13 AM
  3. Replies: 1
    Last Post: 17 Sep 2014, 1:51 AM
  4. Replies: 3
    Last Post: 5 Oct 2009, 7:28 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
  •