Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AG-Grid: Floating filters will not appear unless the filter property is set to true in the column definition. #1406

Closed
2 tasks done
vamshisai98 opened this issue Jul 26, 2024 · 2 comments
Labels
triage We discuss this topic in our internal weekly wait for response Wait for author response

Comments

@vamshisai98
Copy link

vamshisai98 commented Jul 26, 2024

Prerequisites

  • I have read the Contributing Guidelines.
  • I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

Filter

Floating filters are only available in columns when the main filter option is enabled, resulting in both the main and floating filters being present in the column.

when floating filter is true and filter is false, The filter components disappear. (refer below ss)

FF2

What type of frontend framework are you seeing the problem on?

Angular v17.x

Which version of iX do you use?

v.2.4.1

Code to produce this issue.

<ag-grid-angular style="height: 20rem;" class="ag-theme-alpine" [columnDefs]="searchResultCol"
    [rowData]="searchResultRow" rowSelection="multiple"  suppressCellFocus checkboxSelection></ag-grid-angular>



  public searchResultCol: ColDef[] = [
    
    {
      field: 'type',
      headerName: 'Type',
      resizable: true,
      checkboxSelection: true,
      flex: 1,
      filter: false,
      floatingFilter:true
    },
    {
      field: 'status',
      headerName: 'Status',
      resizable: true,
      sortable: true,
      flex: 1,
    },
    { field: 'hwVersion', headerName: 'HW version', flex: 1},
    
  ];
  public searchResultRow : any = [
    {
      type: 'Equipment',
      status: 'Normal',
      hwVersion: '2.0',
      checked: false,
    },
    {
      type: 'Positioner',
      status: 'Maintenance',
      hwVersion: '1.0',
      checked: true,
    },
    {
      type: 'Pressure sensor',
      status: 'Unknown',
      hwVersion: 'N/A',
      checked: false,
    },
  ];

Expected behaviour

Floating filters should also be accessible or visible in columns where the main filter option is set to false and floating filter is set true true

@vamshisai98 vamshisai98 added the triage We discuss this topic in our internal weekly label Jul 26, 2024
@vamshisai98 vamshisai98 changed the title AG-Grid: Floating filter is removed if Filter is not set to true in column header AG-Grid: Floating filters will not appear unless the filter property is set to true in the column definition. Aug 2, 2024
@matthiashader
Copy link
Collaborator

Hello @vamshisai98! If you just want to block the interaction with the header (this includes the filtering icon), you can just suppress the menu interaction like:
suppressMenu: true,
or
menuTabs: []
inside the ColDef.
Here is also a small example: https://stackblitz.com/edit/ifgm2w?file=src%2Fapp%2Faggrid.html,src%2Fapp%2Faggrid.ts

@matthiashader matthiashader added the wait for response Wait for author response label Aug 5, 2024
@vamshisai98
Copy link
Author

Thank you this worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage We discuss this topic in our internal weekly wait for response Wait for author response
Projects
None yet
Development

No branches or pull requests

2 participants