Skip to content

Commit

Permalink
[Obs AI Assistant] Fix multiple flyouts (elastic#204087)
Browse files Browse the repository at this point in the history
  • Loading branch information
viduni94 committed Jan 30, 2025
1 parent b878f24 commit 939b920
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { EuiButton, EuiButtonEmpty, EuiLoadingSpinner, EuiToolTip } from '@elast
import { css } from '@emotion/react';
import { v4 } from 'uuid';
import useObservable from 'react-use/lib/useObservable';
import { debounceTime } from 'rxjs';
import { i18n } from '@kbn/i18n';
import { CoreStart } from '@kbn/core-lifecycle-browser';
import {
Expand Down Expand Up @@ -117,11 +116,9 @@ export function NavControl({ isServerless }: { isServerless?: boolean }) {
);

useEffect(() => {
const conversationSubscription = service.conversations.predefinedConversation$
.pipe(debounceTime(300))
.subscribe(() => {
openFlyout();
});
const conversationSubscription = service.conversations.predefinedConversation$.subscribe(() => {
openFlyout();
});

return () => {
conversationSubscription.unsubscribe();
Expand Down

0 comments on commit 939b920

Please sign in to comment.