SDKsReact Native
Search groups
Search locally cached or joined groups by group ID or group name using the OpenIM React Native SDK.
Search locally cached or joined groups by group ID or name keywords:
const groups = await OpenIMSDK.searchGroups({
keywordList: ['project'],
isSearchGroupID: false,
isSearchGroupName: true,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keywordList | string[] | Yes | Array of keyword strings to search for. |
isSearchGroupID | boolean | Yes | Whether to match group IDs against the search keywords. |
isSearchGroupName | boolean | Yes | Whether to match group names against the search keywords. |
Return value
A resolved Promise returns GroupItem[] matching the search criteria. Correlate and display group entries using groupID as the unique key. For field definitions, see Group overview.
Was this page helpful?