Global helper breaking changes
-
@jan_blaha So what I mean given the referenced playground is when we attempt to use a function created inside the global helper js such as
toUpperCase
in that given example it does not work as expected. The template namemain
contains some js code for its template that loadssum
function frommymodule
but if you attempt to usetoUpperCase
it will not work
If this doesn't help i can definitely build a repro
-
I think I get it now. You want to use something like this in your template content.
<script> var = toUpperCase('aaaa') </script>
However, this was never working also in v2.
The shared helper assets will add templating engine helpers. So the functions you can use as helpers
{{toUpperCase "aa"}}
What am I missing?
-
I don't want to use it on the template content, there we use handlebars syntax, and works perfectly, i want to use it on the javascript attached to that template helpers/script (not sure exactly what name i should assign it but its the generated helpers.js file)
-
So like this right?
https://playground.jsreport.net/w/anon/XQ0cIwuo
-
That's correct
-
Thank you. I see, yes that should work. We will check whats the issue.
I apologize for the problems.
-
No worries, i wanted to confirm first with JSReport team to be sure if there's a new way that was introduced or if this was actually a bug
Thanks for the fast reply btw :)
-
This should be now fixed in the jsreport 3.2.0
-
@jan_blaha After testing the new version it seems to be fixed, thanks
-
Excellent! Thank you for the confirmation.