Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onAfterSetValue example correctness #926

Closed
dpnishant opened this issue Oct 2, 2021 · 4 comments
Closed

onAfterSetValue example correctness #926

dpnishant opened this issue Oct 2, 2021 · 4 comments

Comments

@dpnishant
Copy link

Is this example event handler correct: https://github.com/mistic100/jQuery-QueryBuilder/blob/dev/examples/index.html#L417-L421

With the debugger I'm not "breaking into" this function, even if I edited the HTML with a JSON that includes this rule filter with a value.

@mistic100
Copy link
Owner

That's some outdated code.
The correct way is to use valueSetter filter property and/or afterUpdateRuleValue event

@dpnishant
Copy link
Author

@mistic100 So if I understand correctly currently it is not supported to declaratively define event handlers on a per-filter basis. Is that correct?

@mistic100
Copy link
Owner

I was possible and will never be again. It's not a problem though afterUpdateRuleValue is called with a rule object and you can test the filter applied.

@dpnishant
Copy link
Author

Got it. Thanks for the confirmation.

mistic100 added a commit that referenced this issue Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants