-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Braces not working with pipes #256
Comments
It's unfortunately not possible to combine filters with operations in that way. After a filter |
What a pity. Can you think of any other workaround? Or is it possible to use math functions like min max and then do some arithmetic? Thank you |
@perotom sure. The trick is to use multiple filters chained together, eg.
|
@nebrelbug Sounds like a nice idea but let's just flip the subtraction in your example: |
@perotom yeah, Squirrelly unfortunately only supports top-level filters. Your best bet would be to use JS expressions inside of your filter. As an example:
|
@nebrelbug Thanks for the idea, sadly we have a lot of subtractions with different variables so this approach won't work out in the long run. |
It's unfortunately probably not feasible for this project :(. |
Describe the bug
I would like to use braces in my expressions to do some calculations. When using pipes this creates some issues.
To Reproduce
Try to use braces mixed with pipes like:
One can reproduce it in the playground for the display array examples like:
https://squirrelly.js.org/playground/
Expected behavior
Braces should work as "usual" which normally are used to change evaluation order.
Package & Environment Details
The text was updated successfully, but these errors were encountered: