Discussion

Ask a Question
Back to All

Extend view conditionally based on entity's project name or team name or whatever

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:

  1. 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?
  2. 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?
  3. Even If I use addBlock, it's only added above all existing blocks, can I change its position or order?

thanks!