You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A genesis widget with non-$-prefixed attributes will always re-render itself and its contents on the first refresh cycle. This is because in the render method, the widget only computes the attributes starting with $. As a result, the first time the widget's refresh method is run, computeAttributes() returns false positives for all attributes not starting with $ suggesting that they have changed. The refresh method should also ignore all attributes not prefixed with $.
@Jermolene ... Can you remember, why you did restrict this.computeAttribute for the genesis-widget in the first run?
Yes, the reason it is done is because we only want to compute the values of the attributes that are actually used by the genesis widget itself. We handle the other attributes that are to be passed directly onto the created widget by copying the parse tree nodes themselves. The values of those attributes will be computed when that created widget is instantiated.
In other words, it is to avoid computing an expensive filtered attribute twice.
A genesis widget with non-
$
-prefixed attributes will always re-render itself and its contents on the first refresh cycle. This is because in the render method, the widget only computes the attributes starting with$
. As a result, the first time the widget's refresh method is run,computeAttributes()
returns false positives for all attributes not starting with$
suggesting that they have changed. The refresh method should also ignore all attributes not prefixed with$
.To test:
The text was updated successfully, but these errors were encountered: