Skip to content

Commit

Permalink
fix: show no results found message when no search result for assignee
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Jul 16, 2024
1 parent 1465a92 commit 26e6eee
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 26e6eee

Please sign in to comment.