ISSUE-15358: add function getting users and bots. (#15501)

This commit is contained in:
k.nakagaki 2024-03-14 15:06:30 +09:00 committed by GitHub
parent fd403bae9a
commit 8cc4ccdacd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,6 +230,13 @@ const getUserOptions = async (searchText: string) => {
}); });
}; };
const getUserBotOptions = async (searchText: string) => {
return searchEntity({
searchText,
searchIndex: SearchIndex.USER,
});
};
const getTeamOptions = async (searchText: string) => { const getTeamOptions = async (searchText: string) => {
return searchEntity({ searchText, searchIndex: SearchIndex.TEAM }); return searchEntity({ searchText, searchIndex: SearchIndex.TEAM });
}; };
@ -546,7 +553,7 @@ export const getFieldByArgumentType = (
}, },
]}> ]}>
<AsyncSelect <AsyncSelect
api={getUserOptions} api={getUserBotOptions}
className="w-full" className="w-full"
data-testid="user-name-select" data-testid="user-name-select"
mode="multiple" mode="multiple"