@abgov/jsonforms-components 1.45.0 → 1.46.0

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.esm.js +18 -4
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -8120,7 +8120,7 @@ const AddressLookUpControl = props => {
8120
8120
  const dropdownRef = useRef(null);
8121
8121
  const handleInputChange = (field, value) => {
8122
8122
  var _a, _b;
8123
- if (field === 'addressLine1' && searchTerm.length < 3) {
8123
+ if (field === 'addressLine1') {
8124
8124
  setDropdownSelected(false);
8125
8125
  }
8126
8126
  let newAddress;
@@ -8191,6 +8191,18 @@ const AddressLookUpControl = props => {
8191
8191
  setSuggestions([]);
8192
8192
  setOpen(false);
8193
8193
  };
8194
+ useEffect(() => {
8195
+ var _a;
8196
+ if (dropdownRef.current && selectedIndex !== -1) {
8197
+ const activeItem = (_a = dropdownRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(`li[data-index="${selectedIndex}"]`);
8198
+ if (activeItem) {
8199
+ activeItem.scrollIntoView({
8200
+ behavior: 'smooth',
8201
+ block: 'nearest'
8202
+ });
8203
+ }
8204
+ }
8205
+ }, [selectedIndex]);
8194
8206
  const handleKeyDown = (e, value, key) => {
8195
8207
  var _a;
8196
8208
  if (key === 'ArrowDown') {
@@ -8798,9 +8810,11 @@ const FullNameDobReviewControl = props => {
8798
8810
  label: "Last name",
8799
8811
  requirement: (requiredFields === null || requiredFields === void 0 ? void 0 : requiredFields.includes('lastName')) ? 'required' : undefined,
8800
8812
  error: (_d = errors === null || errors === void 0 ? void 0 : errors['lastName']) !== null && _d !== void 0 ? _d : '',
8801
- children: jsx("div", {
8802
- "data-testid": `lastName-control-${props.id}`,
8803
- children: (_e = props.data) === null || _e === void 0 ? void 0 : _e.lastName
8813
+ children: jsx(TextWrapDiv, {
8814
+ children: jsx("div", {
8815
+ "data-testid": `lastName-control-${props.id}`,
8816
+ children: (_e = props.data) === null || _e === void 0 ? void 0 : _e.lastName
8817
+ })
8804
8818
  })
8805
8819
  })]
8806
8820
  }), jsx(GoAGrid, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.45.0",
3
+ "version": "1.46.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",