Using componentHandler.upgradeAllRegistered(); upgrades all matching elements within the DOM, which is an unnecessary performance cost in my case:
When I insert an element in the DOM, anything from parent to root does not need to be re-upgraded. Only the element and its children are newly created elements and need re-initialization.
How can I achieve this functionality?
Some insides: https://github.com/google/material-design-lite/issues/871
componentHandler.upgradeElements(node)
Where the node variable is the element (and children) you wish to upgrade.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With