fix: admin/config: limit output was not enforcing 1 as lower limit

Massimo Melina committed Apr 8, 2022 at 10:40 UTC b4e57b1fff21f14aece97ff5013efc5005a14241
2 files changed +3 -1
admin/src/Form.ts
+2 -1
@@ -302,7 +302,7 @@ function commonSelectProps<T>(props: { sx?:SxProps, label?: FieldProps<T>['label
302 }
303 }
304
305 -export function NumberField({ value, onChange, ...props }: FieldProps<number | null>) {
305 +export function NumberField({ value, onChange, min, max, step, ...props }: FieldProps<number | null>) {
306 // @ts-ignore
307 return h(StringField, {
308 type: 'number',
@@ -310,6 +310,7 @@ export function NumberField({ value, onChange, ...props }: FieldProps<number | n
310 onChange(v, { was, ...rest }) {
311 onChange(v ? Number(v) : null, { ...rest, was:was ? Number(was) : null })
312 },
313 + inputProps: { min, max, step, },
314 ...props,
315 })
316 }
todo.md
+1
@@ -1,4 +1,5 @@
1 # To do
2 +- log exceptions
3 - watch certificates for change
4 - admin/fs: render virtual folders differently
5 - admin/config: hide advanced settings