Fix add remove button for multifield attributes
This commit is contained in:
@ -426,21 +426,23 @@ function AddRemoveButtonsMultiValuedAttribute(props: {
|
||||
return (
|
||||
<>
|
||||
{hasRemove && (
|
||||
<button
|
||||
id={`kc-remove${idPostfix}`}
|
||||
type="button"
|
||||
className="pf-c-button pf-m-inline pf-m-link"
|
||||
onClick={() =>
|
||||
dispatchFormAction({
|
||||
action: "update",
|
||||
name: attribute.name,
|
||||
valueOrValues: values.filter((_, i) => i !== fieldIndex)
|
||||
})
|
||||
}
|
||||
>
|
||||
{msg("remove")}
|
||||
{hasRemove ? <> | </> : null}
|
||||
</button>
|
||||
<>
|
||||
<button
|
||||
id={`kc-remove${idPostfix}`}
|
||||
type="button"
|
||||
className="pf-c-button pf-m-inline pf-m-link"
|
||||
onClick={() =>
|
||||
dispatchFormAction({
|
||||
action: "update",
|
||||
name: attribute.name,
|
||||
valueOrValues: values.filter((_, i) => i !== fieldIndex)
|
||||
})
|
||||
}
|
||||
>
|
||||
{msg("remove")}
|
||||
</button>
|
||||
{hasAdd ? <> | </> : null}
|
||||
</>
|
||||
)}
|
||||
{hasAdd && (
|
||||
<button
|
||||
|
Reference in New Issue
Block a user