Skip to content

Commit

Permalink
fix(admin-ui): problem in saving some fields #221
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrydy committed Sep 15, 2021
1 parent 4769728 commit bd356c3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"inum": "Inum",
"is_active": "Is Active",
"is_expirable_client": "Is Expirable Client?",
"is_trusted_client": "Is Trusted Client",
"is_trusted_client": "Skip Authorization Flow?",
"json_web_keys": "JSON Web Keys",
"jwks": "Jwks",
"jwks_uri": "Jwks Uri",
Expand Down
11 changes: 6 additions & 5 deletions app/routes/Apps/Gluu/GluuTypeAheadWithAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ function GluuTypeAheadWithAdd({
const newItem = document.getElementById(inputId).value
document.getElementById(inputId).value = ''
if (validator(newItem)) {
setItems((currItems) => [...currItems, newItem])
setOpts((currOpts) => [...currOpts, newItem])
items.push(newItem)
opts.push(newItem)
setItems(items)
formik.setFieldValue(name, items)
}
}

const handleChange = (name, selected) => {
console.log(selected)
setItems(selected)
setOpts(selected)
formik.setFieldValue(name, items)
setItems(selected)
formik.setFieldValue(name, selected);
}

return (
Expand Down Expand Up @@ -63,6 +63,7 @@ function GluuTypeAheadWithAdd({
onChange={(selected) => {
handleChange(name, selected)
}}

id={name}
name={name}
multiple={true}
Expand Down
1 change: 1 addition & 0 deletions plugins/auth-server/components/Clients/ClientEditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function ClientEditPage({
const history = useHistory()
function handleSubmit(data) {
if (data) {
console.log("================================"+JSON.stringify(data))
buildPayload(userAction, data.action_message, data)
dispatch(editClient(userAction))
history.push('/auth-server/clients')
Expand Down

0 comments on commit bd356c3

Please sign in to comment.