@openmrs/esm-form-engine-lib 3.0.0-pre.1638 → 3.0.0-pre.1644
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/2f7bdab923addd01/2f7bdab923addd01.gz +0 -0
- package/b993f7ebd85e96c5/b993f7ebd85e96c5.gz +0 -0
- package/package.json +1 -1
- package/src/components/inputs/number/number.component.tsx +2 -2
- package/src/types/schema.ts +5 -0
- package/57754c83609c70f8/57754c83609c70f8.gz +0 -0
- package/debf4509fa6c6330/debf4509fa6c6330.gz +0 -0
- /package/{deb4dd8487afa634/deb4dd8487afa634.gz → acad44ae2a2118d5/acad44ae2a2118d5.gz} +0 -0
- /package/{f9c4ee1117a7144e/f9c4ee1117a7144e.gz → afed242d3ca98bd3/afed242d3ca98bd3.gz} +0 -0
Binary file
|
Binary file
|
package/package.json
CHANGED
@@ -70,14 +70,14 @@ const NumberField: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
|
|
70
70
|
onBlur={onBlur}
|
71
71
|
allowEmpty={true}
|
72
72
|
size="lg"
|
73
|
-
hideSteppers={
|
73
|
+
hideSteppers={field.hideSteppers ?? false}
|
74
74
|
onWheel={(e) => e.target.blur()}
|
75
75
|
disabled={field.isDisabled}
|
76
76
|
readOnly={isTrue(field.readonly)}
|
77
77
|
className={classNames(styles.controlWidthConstrained, styles.boldedLabel)}
|
78
78
|
warn={warnings.length > 0}
|
79
79
|
warnText={warnings[0]?.message}
|
80
|
-
step={0.01}
|
80
|
+
step={field.questionOptions.step ?? 0.01}
|
81
81
|
/>
|
82
82
|
</Layer>
|
83
83
|
)
|
package/src/types/schema.ts
CHANGED
@@ -84,6 +84,7 @@ export interface FormField {
|
|
84
84
|
questionInfo?: string;
|
85
85
|
historicalExpression?: string;
|
86
86
|
constrainMaxWidth?: boolean;
|
87
|
+
hideSteppers?: boolean;
|
87
88
|
/** @deprecated */
|
88
89
|
inlineMultiCheckbox?: boolean;
|
89
90
|
meta?: QuestionMetaProps;
|
@@ -143,6 +144,10 @@ export interface FormQuestionOptions {
|
|
143
144
|
*/
|
144
145
|
max?: string;
|
145
146
|
min?: string;
|
147
|
+
/**
|
148
|
+
* specifies the increment or decrement step for number field values
|
149
|
+
*/
|
150
|
+
step?: number;
|
146
151
|
/**
|
147
152
|
* maxLength and maxLength are used to validate text field length
|
148
153
|
*/
|
Binary file
|
Binary file
|
File without changes
|
File without changes
|