Skip to content

Commit 44b876f

Browse files
authored
refactor(component): simplify componentFocusable util (#11825)
1 parent 9b2d801 commit 44b876f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

packages/calcite-components/src/utils/component.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { LitElement } from "@arcgis/lumina";
2-
import { isServer } from "lit";
32
import { Scale } from "../components/interfaces";
43
import { ComboboxChildElement } from "../components/combobox/interfaces";
54
import { StepperItem } from "../components/stepper-item/stepper-item";
@@ -51,11 +50,5 @@ export function isHidden<C extends ComboboxChildElement | StepperItem["el"] | Ta
5150
*/
5251
export async function componentFocusable(component: LitElement): Promise<void> {
5352
await component.componentOnReady();
54-
55-
if (isServer) {
56-
return;
57-
}
58-
59-
component.requestUpdate();
60-
return new Promise((resolve) => requestAnimationFrame(() => resolve()));
53+
await component.updateComplete;
6154
}

0 commit comments

Comments
 (0)