-
Notifications
You must be signed in to change notification settings - Fork 96
Description
Describe the bug
When running in dev mode, many wa-* components cause Lit to warn about "scheduled an update after an update completed" when first rendered.
The equivalent Shoelace components did not issue this warning.
To Reproduce
Steps to reproduce the behavior:
- Create a custom LitElement that renders some Web Awesome components, e.g., wa-button
- Run a development server and view your project
- Examine the browser console:
Results:
Element wa-button scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update. See https://lit.dev/msg/change-in-update for more information.
Expected: did not generally occur with Shoelace. (There were some specific component/property value combos that could cause that warning, but not just rendering components in the initial state.)
Demo
Here's a codepen that loads Lit in dev mode and renders wa-button and sl-button side by side. Notice the console output warns about wa-button but not sl-button.
https://codepen.io/mvedmunds/pen/azvWxYq?editors=0011
Screenshots
More information
At a minimum, these components are affected in 3.0.0.beta-4:
- wa-button
- wa-card
- wa-checkbox
- wa-input
- wa-radio
- wa-radio-group
- wa-select
- wa-slider
(I'm using [email protected], but saw the same warning with earlier versions.)