Fix search

This commit is contained in:
MyNameIsBatman 2022-09-17 01:12:17 -03:00
parent 5c13d044c6
commit 0ad2592f4e

View File

@ -22,6 +22,11 @@ export const ChatHistoryView: FC<{}> = props =>
return chatHistory.filter((i) => (i.message && i.message.includes(searchText)) || i.name.includes(searchText)); return chatHistory.filter((i) => (i.message && i.message.includes(searchText)) || i.name.includes(searchText));
}, [ chatHistory, searchText ]); }, [ chatHistory, searchText ]);
useEffect(() =>
{
cache.clearAll();
}, [ filteredChatHistory ]);
const RowRenderer: ListRowRenderer = (props: ListRowProps) => const RowRenderer: ListRowRenderer = (props: ListRowProps) =>
{ {
const item = filteredChatHistory[props.index]; const item = filteredChatHistory[props.index];