MCPcopy Create free account
hub / github.com/TanStack/hotkeys / updated

Method updated

examples/lit/hotkey/src/app.ts:67–81  ·  view source on GitHub ↗
(changedProps: Map<PropertyKey, unknown>)

Source from the content-addressed store, hash-verified

65 private _modalRegistrations: Array<HotkeyRegistrationHandle> = []
66
67 override updated(changedProps: Map<PropertyKey, unknown>): void {
68 super.updated(changedProps)
69
70 if (this._scopedRegistrations.length === 0) {
71 this._registerScopedHotkeys()
72 }
73
74 if (changedProps.has('modalOpen')) {
75 this._unregisterModal()
76 if (this.modalOpen) {
77 this._registerModalHotkeys()
78 this.modalRef.value?.focus()
79 }
80 }
81 }
82
83 override disconnectedCallback(): void {
84 super.disconnectedCallback()

Callers

nothing calls this directly

Calls 3

_unregisterModalMethod · 0.95
_registerModalHotkeysMethod · 0.95

Tested by

no test coverage detected