fiter icons not hiding when i clicked toolbar filter button

Posted by: bemes9226 on 16 February 2021, 5:26 pm EST

  • Posted 16 February 2021, 5:26 pm EST

    need to when i click filter icon in toolbar show filter button in columns,when i click again hide it.
  • Replied 17 February 2021, 2:26 pm EST

    Hi bemes9226,

    It seems that this is not the default filter of FlexGrid. Can you let me know how have you added this filter?

    Regards,
    Ashwin
  • Replied 18 February 2021, 10:29 pm EST

    <wj-flex-grid
    #grid
    [itemsSource]="data"
    [allowSorting]="false"
    [autoGenerateColumns]="false"
    [columnGroups]="columns"
    [headersVisibility]="1"
    [showSort]="true"
    class="no-scrollbars"
    (click)="getId(grid,$event)"
    (initialized)="initGrid(grid,$event)" >
    <wj-flex-grid-filter #filter></wj-flex-grid-filter>
    </wj-flex-grid>

    @ViewChild('filter', { static: true }) gridFilter: wjcGridFilter.FlexGridFilter;
    @ViewChild('grid', { static: true }) flexGrid: wjcGrid.FlexGrid;
    toolbarData: ({ label: string; icon: string; action: () => void; control?: undefined; } | { control: { label: string; checked: boolean; action: (control: any) => void; }; label?: undefined; icon?: undefined; action?: undefined; })[];
    toolbarConfig: any = {
    filterButtonHidden: false,
    filtersHidden: true,
    groupButtonHidden: false,
    groupPanelHidden: true,
    toggleFilter: this.toggleFilter.bind(this),
    toggleGroupPanel: () => {
    this.toolbarConfig.groupPanelHidden = !this.toolbarConfig.groupPanelHidden;
    }
    };
    toggleFilter() {
    this.toolbarConfig.filtersHidden = !this.toolbarConfig.filtersHidden;
    if (this.toolbarConfig.filtersHidden) {
    this.gridFilter.clear();
    }
    }
    https://codesandbox.io/s/wijmo-angular-forked-0umf6
  • Replied 21 February 2021, 11:04 pm EST

    Hi,

    From the code snippet also, I can see that you are using some toolbar to display the filter. I am thinking that there is a method that you call when the filter button on the toolbar is clicked.
    Can you let me know which toolbar you are using and what method is called when clicking on the filter icon.

    ~regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels