fix(ui): min fallback on nodes number fields -> -NUMPY_RAND_MAX

This commit is contained in:
psychedelicious 2024-01-03 07:35:12 +11:00
parent 4a43e1c1b8
commit 93e08df849

View File

@ -1,4 +1,4 @@
import { NUMPY_RAND_MAX, NUMPY_RAND_MIN } from 'app/constants';
import { NUMPY_RAND_MAX } from 'app/constants';
import { useAppDispatch } from 'app/store/storeHooks';
import { InvNumberInput } from 'common/components/InvNumberInput/InvNumberInput';
import { fieldNumberValueChanged } from 'features/nodes/store/nodesSlice';
@ -63,9 +63,10 @@ const NumberFieldInputComponent = (
<InvNumberInput
onChange={handleValueChanged}
value={field.value}
min={min ?? NUMPY_RAND_MIN}
min={min ?? -NUMPY_RAND_MAX}
max={max ?? NUMPY_RAND_MAX}
step={isIntegerField ? 1 : 0.1}
fineStep={isIntegerField ? 1 : 0.01}
className="nodrag"
/>
);