feat: support removing config values via null
This commit is contained in:
parent
9aedd9baad
commit
ea2ffdf0c1
2 changed files with 7 additions and 2 deletions
|
|
@ -91,9 +91,9 @@ function NameserverList({ isGlobal, isDisabled, nameservers, name }: ListProps)
|
|||
})
|
||||
} else {
|
||||
const key = `dns.nameservers.split."${name}"`
|
||||
const list = nameservers.filter((_, i) => i !== index)
|
||||
submit({
|
||||
[key]: nameservers
|
||||
.filter((_, i) => i !== index),
|
||||
[key]: list.length ? list : null,
|
||||
}, {
|
||||
method: 'PATCH',
|
||||
encType: 'application/json',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue