Skip to content

Commit

Permalink
Merge pull request #87 from plasne/pelasne/fix-chat-list-selection
Browse files Browse the repository at this point in the history
Fix refresh issues with ChatList selection
  • Loading branch information
plasne authored Mar 6, 2024
2 parents 06b819b + 6cfc293 commit 564d79e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mgt-chat/src/components/ChatList/ChatList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState, useRef, useMemo } from 'react';
import React, { useCallback, useEffect, useState, useRef } from 'react';
import { ChatListItem } from '../ChatListItem/ChatListItem';
import { MgtTemplateProps, Spinner, log, error } from '@microsoft/mgt-react';
import { makeStyles, Button, FluentProvider, shorthands, webLightTheme } from '@fluentui/react-components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const ChatListItem = ({ chat, userId: myId, isSelected, isRead }: IChatLi
useEffect(() => {
setBots(undefined);
isBotsLoadingOrLoaded.current = false;
}, [chat]);
}, [chat?.id]);

const startLoadingBotsInChat = async (chatId: string) => {
// ensure this is only called once
Expand Down

0 comments on commit 564d79e

Please sign in to comment.