Discussion
Extend view conditionally based on entity's project name or team name or whatever
over 6 years ago by Maxim Valenko
I'm trying to add new block to the entity view based on which project or team this entity belongs to. So I have couple of questions:
- now I use view.onRender method's second argument to figure out entity's Id and then I make GET request to /api/v1/Assignables/:id in order to get full entity's data. Is there more elegant way to do this?
- Then I can't use view.addBlock method since looks like it doesn't work from async callbacks, do I have to use manual DOM manipulations in order to make it work?
- Even If I use addBlock, it's only added above all existing blocks, can I change its position or order?
thanks!