@openmrs/esm-form-engine-lib 4.1.1-pre.2360 → 4.1.1-pre.2362

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.
@@ -1 +1 @@
1
- {"version":3,"file":"text.component.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text/text.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqD5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"text.component.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text/text.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsD5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -41,6 +41,7 @@ const TextField = ({ field, value, errors, warnings, setFieldValue })=>{
41
41
  className: styles.boldedLabel
42
42
  }, /*#__PURE__*/ React.createElement(Layer, null, /*#__PURE__*/ React.createElement(TextInput, {
43
43
  disabled: field.isDisabled,
44
+ enableCounter: !!(field.questionOptions.max || field.questionOptions.maxLength),
44
45
  id: field.id,
45
46
  invalid: errors.length > 0,
46
47
  invalidText: errors[0]?.message,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-form-engine-lib",
3
- "version": "4.1.1-pre.2360",
3
+ "version": "4.1.1-pre.2362",
4
4
  "description": "React Form Engine for O3",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -41,6 +41,7 @@ const TextField: React.FC<FormFieldInputProps> = ({ field, value, errors, warnin
41
41
  <Layer>
42
42
  <TextInput
43
43
  disabled={field.isDisabled}
44
+ enableCounter={!!(field.questionOptions.max || field.questionOptions.maxLength)}
44
45
  id={field.id}
45
46
  invalid={errors.length > 0}
46
47
  invalidText={errors[0]?.message}