Does this library support calculation operator such as + - * /
kellywang1234 opened this issue · 1 comments
Really helpful library! i am using it now. More implementation comes, I am wondering if querybuilder library support more complex calculation operator such as multiple, divide, plus, minus?
For example i want to implement a rule/condition where it can be:
First Value Field * Second Value Field = 2
Is it possible to realize?
Thank you!
Thanks for the kind words! I've been considering adding a "function" value type for a while, which might cover the +
/-
/*
//
use cases as well.
In the meantime, you can do something like what I implemented in my day job which is to encode the expression in the rule value
as a plain string, then parse it from the props during render and then reconstruct the string in the correct format when you call props.handleOnChange()
.