Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 8f8971c

Browse files
committed
fix: only clear form data for removed search role
1 parent ddb943c commit 8f8971c

File tree

1 file changed

+1
-1
lines changed
  • src/routes/CreateNewTeam/components/TeamDetailsModal

1 file changed

+1
-1
lines changed

src/routes/CreateNewTeam/components/TeamDetailsModal/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function TeamDetailsModal({ open, onClose, submitForm, addedRoles }) {
4040
if (fieldName === "teamName" || fieldName === "teamDescription") {
4141
continue;
4242
}
43-
if (addedRoles.findIndex((role) => role.searchId === fieldName)) {
43+
if (addedRoles.findIndex((role) => role.searchId === fieldName) === -1) {
4444
clearFormField(fieldName);
4545
setStartMonthVisible((state) => ({ ...state, [fieldName]: false }));
4646
}

0 commit comments

Comments
 (0)