fix(xo-web/kubernetes): handle empty searches domain field

Do not send `['']` if empty.
This commit is contained in:
Julien Fontanet 2023-09-25 09:08:33 +02:00
parent c8bfda9cf5
commit 70bf8d9620

View File

@ -113,12 +113,11 @@ export default decorate([
})
},
onChangeSearch(__, ev) {
const { value } = ev.target
const input = ev.target.value.trim()
const { onChange, value: prevValue } = this.props
const searches = value.split(',').map(search => search.trim())
onChange({
...prevValue,
searches,
searches: input.length === 0 ? undefined : input.split(',').map(search => search.trim()),
})
},
toggleStaticIpAddress(__, ev) {