We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 67b4bf8 + 1a5b172 commit 910f972Copy full SHA for 910f972
packages/samples/react/src/components/popover-button/basic.tsx
@@ -9,8 +9,13 @@ export const PopoverButtonBasic: FC = () => {
9
const buttonRef = React.useRef<HTMLKolPopoverButtonElement>(null);
10
11
useEffect(() => {
12
- buttonRef.current?.kolFocus();
13
- // es muesste noch ein Klick ausgefuehrt werden
+ const run = async () => {
+ await buttonRef.current?.kolFocus();
14
+ if (buttonRef.current instanceof HTMLButtonElement) {
15
+ buttonRef.current.click();
16
+ }
17
+ };
18
+ run();
19
}, []);
20
21
const dummyEventHandler = {
0 commit comments