-
Notifications
You must be signed in to change notification settings - Fork 880
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ReactiveElement] Adds
scheduleUpdate()
(#2097)
Fixes #2091. Fixes an issue where `performUpdate` was doing double duty as (1) make the element complete a pending update synchronously and (2) override to control update timing. Here `scheduleUpdate()` is added to satisfy (2), reserving (1) for `performUpdate()`. Since by default `scheduleUpdate()` just returns the value of `performUpdate()` this should not break any existing code. However, the docs are updated to recommend that for scheduling `scheduleUpdate()` be implemented in favor of `performUpdate()`.
- Loading branch information
Steve Orvell
committed
Aug 27, 2021
1 parent
043a16f
commit 2b8dd1c
Showing
3 changed files
with
48 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@lit/reactive-element': patch | ||
--- | ||
|
||
Adds `scheduleUpdate()` to control update timing. This should be implemented instead of `performUpdate()`; however, existing overrides of `performUpdate()` will continue to work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters