how do I create a handlebars helper to check boolean in pnp modern search?
-
15-02-2021 - |
Question
I'm using Pnp Modern Search to display the properties of a required SharePoint list item, so for the boolean columns I need to put a check icon if it is true or a minus icon if it is false, but the #if handlebars helper doesn't work for boolean.
My problem is I don't know where I have to declare my own handlebars helper, for example: #ifboolean...
I tried to put a test code in the styling editor(as in the picture below), above and also inside this, just to test and nothing happened. Do I need to do it in the SPFX package and then recreate a new package and reinstall this with the modifications? I'm not an expert so I need your help, please!!!
Thanks in advance!
No correct solution
OTHER TIPS
I found the solution to test boolean:
{{#eq MyBOOL '0'}} <i class="ms-Icon ms-Icon--SkypeCircleMinus"aria-hidden="true"> {{/eq}} {{#eq MITMOWSBOOL '1'}} {{/eq}}