fmi21
fmi21

Reputation: 545

Prevent rerendering of custom Control

For our openUI5 application I have developed two custom controls. One utilizing the gridstack.js library and another using the HighCharts library. The former has the latter as aggregation 'charts' (1...n). When I update the property in the model(deleting, adding a chart), the wrapper control re renders the charts (default behavior).

Is there a way to prevent re-rendering of the aggregation, because it causes both libraries to reload some stuff and this behavior we must avoid.

I thought about calling validate() on the charts aggregation as well as overwriting the setAggregation in the wrapper control.

Any help would be appreciated.

Upvotes: 0

Views: 215

Answers (1)

fmi21
fmi21

Reputation: 545

The solution was to use sap.ui.core.HTML; This control was meant for this scenario, its property preferDOM does exactly that. So instead of rendering the HTML of the libraries I'm using, I set it as content of the sap.ui.core.HTML control.

Upvotes: 1

Related Questions