Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show no results found message when no search result for assignee #45470

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/pages/workspace/card/issueNew/AssigneeStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ function AssigneeStep({policy}: AssigneeStepProps) {
];
}, [membersDetails, debouncedSearchTerm]);

const headerMessage = useMemo(() => {
const searchValue = debouncedSearchTerm.trim().toLowerCase();

return OptionsListUtils.getHeaderMessage(sections[0].data.length !== 0, false, searchValue);
}, [debouncedSearchTerm, sections]);

return (
<ScreenWrapper
testID={AssigneeStep.displayName}
Expand All @@ -142,6 +148,7 @@ function AssigneeStep({policy}: AssigneeStepProps) {
textInputValue={searchTerm}
onChangeText={setSearchTerm}
sections={sections}
headerMessage={headerMessage}
ListItem={UserListItem}
onSelectRow={submit}
/>
Expand Down
Loading