Widget not refreshing on entity refresh

1
I've built the ShowByCondition widget, but I'm experiencing a problem that I cannot explain or overcome: In a page, I have a context object and a Microflow timer, that refreshes the context object based on a attribute. However, when the context object refreshes, the update function of the widget is not called. Has anyone experienced a problem with widgets like this before?
asked
3 answers
4

You need to set up a listener for refreshes to a context entity. The update function doesn't get called when the entity gets refreshed - only when it actually changes.

Take a look at the function in the widget boilerplate called _resetSubscriptions. The objectHandle is what you need for microflow refreshes.

answered
1

It's like Eric says, there is a distinction between what is added to subscriptions. By coincidence, I have checked you widget last week for a client. I'll have a look at it as well, see where the behaviour comes from. If you add a subscription, the callback from that function usually calls _updateRendering

answered
0

I have created a new version of the ShowByCondition widget based on your answers. It is submitted for approval. In the mean time, you can find it here: https://github.com/remcos/ShowByCondition

answered