* Triggers re-rendering of a UI5Element instance due to state change. * @param {ChangeInfo} changeInfo An object with information about the change that caused invalidation. * @private
(this: UI5Element, changeInfo: ChangeInfo)
| 120 | * @private |
| 121 | */ |
| 122 | function _invalidate(this: UI5Element, changeInfo: ChangeInfo) { |
| 123 | // Invalidation should be suppressed: 1) before the component is rendered for the first time 2) and during the execution of onBeforeRendering |
| 124 | // This is necessary not only as an optimization, but also to avoid infinite loops on invalidation between children and parents (when invalidateOnChildChange is used) |
| 125 | if (this._suppressInvalidation) { |
| 126 | return; |
| 127 | } |
| 128 | |
| 129 | const ctor = this.constructor as typeof UI5Element; |
| 130 | |
| 131 | // Skip re-rendering of language-aware components while language-specific data (e.g., CLDR, language bundles) is still loading. |
| 132 | // Once all necessary language data has been loaded, the language change |
| 133 | // will trigger a re-render of all language-aware components. |
| 134 | if (ctor.getMetadata().isLanguageAware() && getLanguageChangePending()) { |
| 135 | return; |
| 136 | } |
| 137 | |
| 138 | // Call the onInvalidation hook |
| 139 | this.onInvalidation(changeInfo); |
| 140 | |
| 141 | this._changedState.push(changeInfo); |
| 142 | renderDeferred(this); |
| 143 | this._invalidationEventProvider.fireEvent("invalidate", { ...changeInfo, target: this }); |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * looks up a property descsriptor including in the prototype chain |
nothing calls this directly
no test coverage detected
searching dependent graphs…