Skip to content

Commit

Permalink
Issue #PS-1271 chore: Resolved checkbox form fiedl submit issue durin…
Browse files Browse the repository at this point in the history
…g user creation
  • Loading branch information
Rushikesh-Sonawane99 committed Aug 9, 2024
1 parent 046c18e commit 831a345
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/AddFacilitator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const AddFacilitatorModal: React.FC<AddFacilitatorModalprops> = ({
) {
apiBody.customFields.push({
fieldId: fieldId,
value: [String(fieldValue)],
value: Array.isArray(fieldValue) ? fieldValue : [fieldValue],
});
} else {
if (fieldSchema.checkbox && fieldSchema.type === 'array') {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddLeanerModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ const AddLearnerModal: React.FC<AddLearnerModalProps> = ({
) {
apiBody.customFields.push({
fieldId: fieldId,
value: [String(fieldValue)],
value: Array.isArray(fieldValue) ? fieldValue : [fieldValue],
});
} else {
apiBody.customFields.push({
Expand Down

0 comments on commit 831a345

Please sign in to comment.