Omit unnecessary recomputations for annotations

This commit is contained in:
squidfunk
2021-12-05 17:51:40 +01:00
parent cb57ce986e
commit 21b7bc4999
8 changed files with 21 additions and 19 deletions

View File

@@ -22,6 +22,7 @@
import {
Observable,
distinctUntilChanged,
fromEvent,
map,
merge,
@@ -60,6 +61,7 @@ export function watchElementFocus(
? el.contains(active)
: false
}),
startWith(el === getActiveElement())
startWith(el === getActiveElement()),
distinctUntilChanged()
)
}