mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 15:40:51 +01:00
Fix search
This commit is contained in:
parent
5c13d044c6
commit
0ad2592f4e
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user