useConversationSearch
Introduction
The useConversationSearch hook is used to implement the conversation search. You can use this hook to create a custom UI for conversation search.
| Property | Type | Description | Optional |
|---|---|---|---|
| searchKey | string | The current search keyword for conversations. | ❌ |
| setSearchKey | Dispatch<string> | Updates the search keyword. | ❌ |
| searchList | Conversation[] | List of conversations matching the search query. | ❌ |
| resetSearch | ZeroArgVoidReturns | Resets the search results. | ❌ |
| searchConversations | ZeroArgVoidReturns | Triggers a conversation search based on searchKey. | ❌ |
| loadMoreConversations | boolean | Indicates if more conversations can be loaded. | ❌ |
| onSearchedConversationClick | OneArgVoidReturns | Handles the event when a searched conversation is clicked. | ❌ |
Reference
For reference checkout this file