Skip to content

Commit

Permalink
fix(admin-ui): remove claim from formic on cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Jun 20, 2022
1 parent 1297cca commit 580f145
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ function UserAddPage() {
onSubmit: (values) => {
submitData(values)
},
setFieldValue: (field) => {
delete values[field]
},
})
return (
<React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ function UserForm({ formik }) {

const removeSelectedClaimsFromState = (id) => {
let tempList = [...selectedClaims]
formik.setFieldValue(id)
let newList = tempList.filter((data, index) => data.name !== id)
setSelectedClaims(newList)
}
Expand Down

0 comments on commit 580f145

Please sign in to comment.