Skip to content

Commit

Permalink
Merge pull request #45470 from koko57/fix/45270-no-results-found
Browse files Browse the repository at this point in the history
fix: show no results found message when no search result for assignee
  • Loading branch information
mountiny authored Jul 18, 2024
2 parents b28458b + 26e6eee commit f81addc
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 f81addc

Please sign in to comment.