Skip to content

Commit

Permalink
Merge pull request #29445 from Samueljh1/main
Browse files Browse the repository at this point in the history
[CP Staging] Fix regression --  empty search box not displaying suggestions
  • Loading branch information
mountiny authored Oct 12, 2023
2 parents ba75ce9 + 467c545 commit 2c18fe3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/workspace/WorkspaceInvitePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,17 @@ function WorkspaceInvitePage(props) {
const excludedUsers = useMemo(() => PolicyUtils.getIneligibleInvitees(props.policyMembers, props.personalDetails), [props.policyMembers, props.personalDetails]);

useEffect(() => {
const emails = _.compact(
let emails = _.compact(
searchTerm
.trim()
.replace(/\s*,\s*/g, ',')
.split(','),
);

if (emails.length === 0) {
emails = [''];
}

const newUsersToInviteDict = {};
const newPersonalDetailsDict = {};
const newSelectedOptionsDict = {};
Expand Down

0 comments on commit 2c18fe3

Please sign in to comment.