From 21f1ef3f676bd155a546f410ec405cc4f0bae81b Mon Sep 17 00:00:00 2001 From: Cleopatra Enjeck M Date: Wed, 3 Apr 2024 15:17:08 +0100 Subject: [PATCH] fix: limit min and max numbers Signed-off-by: Cleopatra Enjeck M --- .../ncTable/partials/rowTypePartials/NumberForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/ncTable/partials/rowTypePartials/NumberForm.vue b/src/shared/components/ncTable/partials/rowTypePartials/NumberForm.vue index a17133a40..b88f87104 100644 --- a/src/shared/components/ncTable/partials/rowTypePartials/NumberForm.vue +++ b/src/shared/components/ncTable/partials/rowTypePartials/NumberForm.vue @@ -89,10 +89,10 @@ export default { } const roundedValue = parsedValue.toFixed(this.column?.numberDecimals) let value = parseFloat(roundedValue) - if (this.column?.numberMin && value < this.column?.numberMin) { + if ((this.column?.numberMin !== null && this.column?.numberMin !== undefined) && value < this.column?.numberMin) { value = this.column.numberMin } - if (this.column?.numberMax && value > this.column?.numberMax) { + if ((this.column?.numberMax !== null && this.column?.numberMax !== undefined) && value > this.column?.numberMax) { value = this.column.numberMax } return value