fix(xo-web/editable/number): throw error if onChange fails (#5634)
This commit is contained in:
parent
a630106d80
commit
f2d4fdd4d2
@ -11,6 +11,8 @@
|
||||
|
||||
> Users must be able to say: “I had this issue, happy to know it's fixed”
|
||||
|
||||
- [Editable number] When you are trying to edit a number and it's failing, display an error (PR [#5634](https://github.com/vatesfr/xen-orchestra/pull/5634))
|
||||
|
||||
### Packages to release
|
||||
|
||||
> Packages will be released in the order they are here, therefore, they should
|
||||
@ -29,3 +31,4 @@
|
||||
> In case of conflict, the highest (lowest in previous list) `$version` wins.
|
||||
|
||||
- xo-server minor
|
||||
- xo-web patch
|
||||
|
@ -294,7 +294,7 @@ export class Number extends Component {
|
||||
return +this.refs.input.value
|
||||
}
|
||||
|
||||
_onChange = (value, params) => {
|
||||
_onChange = async (value, params) => {
|
||||
if (value === '') {
|
||||
if (this.props.nullable) {
|
||||
value = null
|
||||
@ -305,7 +305,7 @@ export class Number extends Component {
|
||||
value = +value
|
||||
}
|
||||
|
||||
this.props.onChange(value, params)
|
||||
await this.props.onChange(value, params)
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user