A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.ag-grid.com/javascript-data-grid/filter-applying/ below:

JavaScript Grid: Applying Filters | AG Grid

This section describes the different ways to apply column filters.

Apply, Clear, Reset and Cancel Buttons Copy Link

By default, the four filters provided by the grid - Text Filter, Number Filter, Date Filter and Set Filter - support different action buttons. When enableFilterHandlers = true, the Multi Filter and Custom Filter Components can also support action buttons.

The four supported action buttons are:

The buttons will be displayed in the order they are specified in the buttons array of the filter params (FilterWrapperParams).

If the filter is in a popup, it can be closed after using a button via closeOnApply. Note the expected behaviour when clicking the filter popup buttons:

Example: Using Buttons Copy Link

The example below demonstrates using the different buttons. It also demonstrates the relationship between the buttons and filter events. Note the following:

Note the following about filter events:

Applying the UI Model Copy Link

Filters maintain a separate unapplied model representing what is shown in the UI, which might change without having yet been applied, for example when an Apply button is present and the user has made changes in the UI but not yet clicked Apply.

This happens for all grid provided filters, or when enableFilterHandlers = true.

Calling api.getColumnFilterModel(column, true) will always return a model representing the current UI, whereas api.getColumnFilterModel(column) will return the applied model that is currently being used for filtering.

It is also possible to perform filter actions such as applying the model via the API doFilterAction(params).

Next Up Copy Link

Continue to the next section to learn about the Filter API.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4