jQuery-QueryBuilder
jQuery-QueryBuilder copied to clipboard
Free input for filter selection
Perhaps I've overlooked the documentation or various examples, but I'd like to use a free-form text input as the filter input. In other words, at runtime, the user can freely type in the filter value as opposed to selecting from a pre-defined list presented in a select list.
I've tried:
- Rule templates: 'custom' placeholder filter, and a custom rule filter (mixed results; struggled with the placement of the operators select)
- Augmenting the UX by presenting an additional form in order to inject custom filters at runtime (adds unnecessary steps)
Any pointers are greatly appreciated.
Just use type: 'string'
?
As an example: check the name
field at this demo: https://querybuilder.js.org/demo.html#plugins
Just use
type: 'string'
?As an example: check the
name
field at this demo: https://querybuilder.js.org/demo.html#plugins
It's my understanding that specifying the type drives the operators list within the rule. Perhaps I need to be more clear on what I'm attempting.
There are three basic components to a given rule:
- Filter
- Operator
- Value
The filter is presented as a dropdown menu. The list contents are predefined at configuration or further modified at runtime. This works great when your list of filters are known.
My challenge is that the filters (and their types) are not known. The user will enter an arbitrary filter, including assigning it a type.
I'm currently exploring overriding the 'filterSelect' template, but this raises some additional challenges. Thus far, I have added an input element, wherein you see
In short, I don't know if there's an easier solve. I'm open to suggestions.
Thank you.
The lib does not provide this functionallity, which is quite similar or linked to #576 and #653
As you could have seen, the developped is quite paused for now.
Hi @mistic100 could you tell me when you will implement this feature ? Actually I need this feature soon. thancks,
Probably never
Sent from MailDroid
-----Original Message----- From: Ghader Hosseinpour @.> To: mistic100/jQuery-QueryBuilder @.> Cc: Damien Sorel @.>, Mention @.> Sent: mer., 29 déc. 2021 8:18 Subject: Re: [mistic100/jQuery-QueryBuilder] Free input for filter selection (#814)
Hi @mistic100 could you tell me when you will implement this feature ? Actually I need this feature soon. thancks,
-- Reply to this email directly or view it on GitHub: https://github.com/mistic100/jQuery-QueryBuilder/issues/814#issuecomment-1002431129 You are receiving this because you were mentioned.
Message ID: @.***>
This would be amazing to have. Literally the only thing stopping me from using it. Does anyone know of any other libraries similar to this that support this type of functionality?
added support for input as a filter
check out my fork here
https://github.com/sematgt/jQuery-QueryBuilder
all changes needed are in this commit fdf4ac90140cae39e01a2d4b8460aa818b977046
now you can simply pass [] as filters and filter select becomes input
also you can edit input filter in core.js