ExtJS ux.grid.FiltersFeature update


The ux.grid.FiltersFeature makes the assumption that a field’s name holds the correct value to use when it builds the query. But sometimes it’s necessary to use a mapping because the field name uses a value that is not legal in JavaScript. However the plugin does not recognize mapping so this update fixes this shortcoming.

For example, we use AWS Cloudfront and we capture the logs to a MySQL database. We use the field names provided by the Cloudfront log to create the log table which has names like ‘cs-uri-stem’. This name cannot be used in ExtJS so a mapping to ‘csuristem’ is used. However the filter feature ignores the mapping so the query it builds is invalid.

The attachment updates the FiltersFeature to use the mapping value if one exists. You can look for ‘BMS’ to see the changes made (or compare it to the original).

The update also updates the feature to recognize tree grids.

FiltersFeature.js

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Be the first to leave a comment!