Skip to content

Commit 165d448

Browse files
authored
fix: respect min and max constraints from number column settings on HTML-level in <input> tag (for better UI experience)
1 parent be96a70 commit 165d448

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adminforth/spa/src/components/ColumnValueInput.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
step="1"
4949
class="w-40"
5050
placeholder="0"
51+
:min="![undefined, null].includes(column.minValue) ? column.minValue : ''"
52+
:max="![undefined, null].includes(column.maxValue) ? column.maxValue : ''"
5153
:prefix="column.inputPrefix"
5254
:suffix="column.inputSuffix"
5355
:readonly="column.editReadonly && source === 'edit'"
@@ -70,6 +72,8 @@
7072
step="0.1"
7173
class="w-40"
7274
placeholder="0.0"
75+
:min="![undefined, null].includes(column.minValue) ? column.minValue : ''"
76+
:max="![undefined, null].includes(column.maxValue) ? column.maxValue : ''"
7377
:prefix="column.inputPrefix"
7478
:suffix="column.inputSuffix"
7579
:modelValue="value"

0 commit comments

Comments
 (0)