From 0ad2592f4e54bba7298ddf6f5c5fe2730bcddac7 Mon Sep 17 00:00:00 2001 From: MyNameIsBatman Date: Sat, 17 Sep 2022 01:12:17 -0300 Subject: [PATCH] Fix search --- src/components/chat-history/ChatHistoryView.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/chat-history/ChatHistoryView.tsx b/src/components/chat-history/ChatHistoryView.tsx index 063385fe..0684c1a7 100644 --- a/src/components/chat-history/ChatHistoryView.tsx +++ b/src/components/chat-history/ChatHistoryView.tsx @@ -22,6 +22,11 @@ export const ChatHistoryView: FC<{}> = props => return chatHistory.filter((i) => (i.message && i.message.includes(searchText)) || i.name.includes(searchText)); }, [ chatHistory, searchText ]); + useEffect(() => + { + cache.clearAll(); + }, [ filteredChatHistory ]); + const RowRenderer: ListRowRenderer = (props: ListRowProps) => { const item = filteredChatHistory[props.index];