From ec54fbe1ef16cd9941e3ed1ccf67cfa8f2268008 Mon Sep 17 00:00:00 2001 From: Matthew Oliveira Date: Tue, 19 Nov 2024 13:23:42 -0500 Subject: [PATCH] fix(locale-search): fix class fields error for inputTimeout (#12112) ### Related Ticket(s) Closes #12087 (partially, see also #12088) ### Description Fixes the following error reported when using react wrapped components: ``` Error: The following properties on element c4d-locale-search will not trigger updates as expected because they are set using class fields: inputTimeout. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information. ``` ### Changelog **Changed** - Declare `inputTimeout` class property of `ThrottledInputMixin` as abstract, relying on children to implement. --- packages/web-components/src/globals/mixins/throttled-input.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-components/src/globals/mixins/throttled-input.ts b/packages/web-components/src/globals/mixins/throttled-input.ts index e0b7ed57cf4..364fdb72aaf 100644 --- a/packages/web-components/src/globals/mixins/throttled-input.ts +++ b/packages/web-components/src/globals/mixins/throttled-input.ts @@ -72,7 +72,7 @@ const ThrottledInputMixin = >(Base: T) => { /** * The throttle timeout to run query upon user input. */ - inputTimeout = 200; + abstract inputTimeout: number; connectedCallback() { // TS seems to miss `HTMLElement.prototype.connectedCallback()` definition