Closed ghost closed 3 years ago
match
is not a standard operator, of you want a custom operator you need to register it https://querybuilder.js.org/#operators
also your define what should happen when select operator
block should be unecessary, you are messing with the builder internals, effectively breaking links by using the wrong "name"
Please create a jsfiddle for a better assistance, I don't have time to setup your code somewhere else
https://jsfiddle.net/gptgaurav04/ofydxcu7/8/
here i m providing you jsfiddle code link
First of all remove your event handler on afterSetRules.queryBuilder afterUpdateRuleOperator.queryBuilder
, as I said this breaks everything.
Now the problem is the builder does not try to rebuild the input, see the condition here: https://github.com/mistic100/jQuery-QueryBuilder/blob/4c30ebd69404f2c347d236e68b66211e6530fb08/src/core.js#L791-L796
A dirty (and only) solution is to use optgroups on operators, put the in
operator in it's own optgroup (and optionally equal
and match
on another optgroup), and it will work.
Also replace rule.__.operator
by rule.operator
https://querybuilder.js.org/index.html#inside_the_box
i only want whenever my page load and html render then VALUE and INPUT type TEXT OR SELECT comes according to operator
Thanks a lot! Great work. it is working now.
thank you for solving my problem.
On Thu, 1 Apr, 2021, 3:45 pm Damien Sorel, @.***> wrote:
First of all remove your event handler on afterSetRules.queryBuilder afterUpdateRuleOperator.queryBuilder, as I said this breaks everything.
Now the problem is the builder does not try to rebuild the input, see the condition here:
A dirty (and only) solution is to use optgroups on operators, put the in operator in it's own optgroup (and optionally equal and match on another optgroup), and it will work.
Also replace rule.__.operator by rule.operator https://querybuilder.js.org/index.html#inside_the_box
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mistic100/jQuery-QueryBuilder/issues/908#issuecomment-811807396, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJZTOHJYOVBNIYOZAGDJSSTTGRBSNANCNFSM42EB5HYA .
Thanks, I'll check it out.
On Sat, 10 Apr, 2021, 12:29 am Damien Sorel, @.***> wrote:
Closed #908 https://github.com/mistic100/jQuery-QueryBuilder/issues/908.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mistic100/jQuery-QueryBuilder/issues/908#event-4575971265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJZTOHIEXTWX7HREKLD27V3TH5FC3ANCNFSM42EB5HYA .
when i set rule operator "equal or match" then value field should have input type and given value but it is working only on (in operator)