mirror of
https://github.com/directus/directus.git
synced 2026-01-30 06:18:09 -05:00
fix number input step up/down when undefined (#12222)
This commit is contained in:
@@ -142,11 +142,11 @@ const classes = computed(() => [
|
||||
]);
|
||||
|
||||
const isStepUpAllowed = computed(() => {
|
||||
return props.disabled === false && (props.max === null || parseInt(String(props.modelValue), 10) < props.max);
|
||||
return props.disabled === false && (props.max === undefined || parseInt(String(props.modelValue), 10) < props.max);
|
||||
});
|
||||
|
||||
const isStepDownAllowed = computed(() => {
|
||||
return props.disabled === false && (props.min === null || parseInt(String(props.modelValue), 10) > props.min);
|
||||
return props.disabled === false && (props.min === undefined || parseInt(String(props.modelValue), 10) > props.min);
|
||||
});
|
||||
|
||||
function processValue(event: KeyboardEvent) {
|
||||
|
||||
@@ -100,11 +100,11 @@ export default defineComponent({
|
||||
},
|
||||
min: {
|
||||
type: Number,
|
||||
default: null,
|
||||
default: undefined,
|
||||
},
|
||||
max: {
|
||||
type: Number,
|
||||
default: null,
|
||||
default: undefined,
|
||||
},
|
||||
step: {
|
||||
type: Number,
|
||||
|
||||
Reference in New Issue
Block a user