In my display template I want to render a field in different ways based on the user's group membership. The information about the group membership comes from an async ajax call (jsom or rest)
What I have discovered is that I have to provide a html string or a function that describes the rendering logic. It demands my override immediately. There is no way to make an ajax (jsom) call to server to look up some information and call back the CSR engine.
There is a similar question on stack exchange, but it is viewed from another side of the problem: How to use jsom without async calls
So my question is: What can I do to enable async rendering in CSR, or delay Client Side Rendering until I get a response from my ajax call? If it is not possible what can I use to ensure I have the (a)sync information in place when my list items are rendered by SharePoint.

0 commentaires:
Enregistrer un commentaire