mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
perf(core): no need for batchUpdated if no selector (#9121)
This commit is contained in:
@ -472,6 +472,9 @@ export class CssState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const matchingSelectors = this._match.selectors.filter((sel) => (sel.dynamic ? sel.match(view) : true));
|
const matchingSelectors = this._match.selectors.filter((sel) => (sel.dynamic ? sel.match(view) : true));
|
||||||
|
if (!matchingSelectors || matchingSelectors.length === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
view._batchUpdate(() => {
|
view._batchUpdate(() => {
|
||||||
this.stopKeyframeAnimations();
|
this.stopKeyframeAnimations();
|
||||||
this.setPropertyValues(matchingSelectors);
|
this.setPropertyValues(matchingSelectors);
|
||||||
|
Reference in New Issue
Block a user