@trackunit/custom-field-components 0.0.240 → 0.0.243

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.
Files changed (2) hide show
  1. package/index.js +2 -2
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -54,7 +54,7 @@ const BooleanCustomField = (_a) => {
54
54
  register && register(id, Object.assign(Object.assign({}, validationRules), { value: internalValue.toString() }));
55
55
  // eslint-disable-next-line react-hooks/exhaustive-deps
56
56
  }, []); // register only once
57
- return (jsx(FormGroup, Object.assign({ label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: `${dataTestId}-FormGroup` }, { children: jsx(Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: id, disabled: disabled, name: id, onChange: onChangeHandler, isInvalid: renderAsInvalid }, rest)) })));
57
+ return (jsx(FormGroup, Object.assign({ label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup` }, { children: jsx(Checkbox, Object.assign({ checked: internalValue, dataTestId: dataTestId, id: id, disabled: disabled, name: id, onChange: onChangeHandler, isInvalid: renderAsInvalid }, rest)) })));
58
58
  };
59
59
 
60
60
  const DateCustomField = (props) => {
@@ -95,7 +95,7 @@ const DropdownCustomField = ({ defaultValue, dataTestId, onChange, onBlur, id, d
95
95
  React.useEffect(() => {
96
96
  register && register(id, Object.assign(Object.assign({}, validationRules), { value: selectedValue }));
97
97
  }, [register, validationRules, selectedValue, id]);
98
- return (jsx(FormGroup, Object.assign({ label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: `${dataTestId}-FormGroup` }, { children: jsx(Select, { disabled: disabled, dataTestId: dataTestId, onChange: onChangeHandler, hasError: renderAsInvalid, options: options, value: selectedValue, isMulti: multiSelect, isClearable: true }) })));
98
+ return (jsx(FormGroup, Object.assign({ label: label, tip: tip, isInvalid: renderAsInvalid, helpText: errorMessage || helpText, helpAddon: helpAddon || null, dataTestId: dataTestId && `${dataTestId}-FormGroup` }, { children: jsx(Select, { disabled: disabled, dataTestId: dataTestId, onChange: onChangeHandler, hasError: renderAsInvalid, options: options, value: selectedValue, isMulti: multiSelect, isClearable: true }) })));
99
99
  };
100
100
 
101
101
  const getWebAddressValidationRules = (definition) => {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "0.0.240",
3
+ "version": "0.0.243",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
7
7
  "@trackunit/react-core-contexts-test": "0.1.19",
8
- "@trackunit/react-components": "0.1.27",
8
+ "@trackunit/react-components": "0.1.30",
9
9
  "react": "18.2.0",
10
10
  "react-hook-form": "7.40.0",
11
11
  "@trackunit/iris-app-runtime-core": "0.3.10",