jQuery-QueryBuilder icon indicating copy to clipboard operation
jQuery-QueryBuilder copied to clipboard

User defined fields

Open fcnyp opened this issue 4 years ago • 1 comments

Looking for guidance on the best approach to implement a requirement.

I would like to use a filter that defines a set of operators and allow the user to type in the field name associated with the available operators.

The default usage requires the filter to define the field name and operators. Due to the nature of the data structure I am working with, the user will need to enter their field name and then select from a list of operators that are defined. Essentially the drop drown field selector should become a text field. Does the community have any guidance and or previously developed plugins/examples to work from? Thanks!

fcnyp avatar Mar 07 '20 19:03 fcnyp

QueryBuilder does not supports dynamic filters, all filters must be provided in the configuration object or added with addFilter/setFilters methods.

If the number of filters is an issue you can create a plugin which use a jQuery widget instead of the standard dropdown, allowing the user to perform a textual search among existing filters.

Check how bt-selectpicker plugin is replacing the filters dropdown.

mistic100 avatar Mar 07 '20 20:03 mistic100