Added support for multiple filter conditions on single column.
pqSelect and native select lists in filter UI replaced by pqGrid to improve performance and provide more features.
column.filter.type and subtype dropped as filter UI type decided by the grid in a more standardized manner.
Support for column.filter.condition
callback dropped.
Custom filtering achieved by overriding inbuilt condition compare functions or creating new conditions by extending pq.filter.conditions namespace.
Support for multiple filter conditions per column has been added by making changes in column.filter
option and filter()
method.
Multiple filter conditions are defined in column.filter as crules array.
You need to change your filter definitions to this format ( even for single filters ) while migration.filter: { mode: 'AND', crules: [ {condition: 'begin', value: 'a'}, {condition: 'end', value: 'b'}, ... ] }
filter method for multiple filter conditions per column is invoked as:
grid.filter({ rule: { dataIndx: 'ShipCountry', mode: 'AND', crules: [ {condition: 'begin', value: 'a'}, {condition: 'end', value: 'b'}, ... ] } })
Native browser select lists and pqSelect are no longer supported in filter row as they render all DOM in browser which has performance implications in big data enterprise applications.
Instead pqGrid ( with its familiar API ) which renders DOM on demand acts as dropdown UI.
In your code, you need to remove any pqSelect dependency / initialization code in column.filter.init
callback.
pqGrid is initialized on its own for range condition and can be customized with filter.gridOptions
.
Different ways to customize filters is demonstrated here.
filter.options
are not required now for most of the cases as they are computed by grid automatically from available data in grid.
Defining UI for filter via filter.type
is longer supported, it's used automatically by grid depending upon filter.condition
and column.dataType
.
Henceforth filter.type
and filter.subtype
are ignored.
Initializing filter controls via filter.init
are no longer required as it's taken care of by grid in most of the cases.
However if you must implement filter.init
, then return true in the callback to signal the grid to abort its own initialization.
In previous versions, filter.condition could be a predefined string or a custom callback.
Callbacks are no longer supported, instead a new filter condition can be defined by extension of pq.filter.conditions
Please check API and demos for more details.
In previous versions, filter.listener
used to be specified.
In view of the added support for changing filter conditions dynamically from header menu, static filter listeners can create problem in proper functioning of filters.
Henceforth filter.listener
need not be specified in most cases and should be used judiciously if at all required.
Including localization file is necessary since this version.
Default strings for English have been moved from main pqgrid.js to the localization files, so ensure to include appropriate locale file without which some of the features may not function properly.
For non-English languages, please refer to the English localization file for new keys and structure and copy them to appropriate files.