mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
M #~: Minor fix onblur attribute function (#2065)
This commit is contained in:
parent
cebaac8477
commit
e8bcf1175f
@ -56,7 +56,14 @@ const AttributeCreateForm = memo(({ handleAdd }) => {
|
||||
}
|
||||
}
|
||||
|
||||
const handleBlur = (evt) => handleSubmit(handleCreateAttribute)(evt)
|
||||
const handleBlur = (evt) => {
|
||||
const nextTarget = evt.relatedTarget?.name
|
||||
|
||||
// If the next target isn't the name or value input, submit the form
|
||||
if (![nameInputKey, valueInputKey].includes(nextTarget)) {
|
||||
handleSubmit(handleCreateAttribute)(evt)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
|
Loading…
x
Reference in New Issue
Block a user