@abgov/jsonforms-components 2.57.0 → 2.57.1

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/index.esm.js CHANGED
@@ -16632,12 +16632,6 @@ const AddressLookUpControl = props => {
16632
16632
  const handleDropdownChange = value => {
16633
16633
  setDropdownSelected(false);
16634
16634
  setSearchTerm(value);
16635
- // keep form data updated immediately (so user sees their input reflected)
16636
- const newAddress = Object.assign({}, address, {
16637
- addressLine1: value
16638
- });
16639
- setAddress(newAddress);
16640
- updateFormData(newAddress);
16641
16635
  };
16642
16636
  /* istanbul ignore next */
16643
16637
  const handleSuggestionClick = suggestion => {
@@ -16648,7 +16642,7 @@ const AddressLookUpControl = props => {
16648
16642
  setErrors({});
16649
16643
  setDropdownSelected(true);
16650
16644
  };
16651
- const handleRequiredFieldBlur = name => {
16645
+ const handleRequiredFieldBlur = (name, value) => {
16652
16646
  const err = Object.assign({}, errors);
16653
16647
  if (!(data != null && data[name]) || data[name] === '' || (data == null ? void 0 : data[name]) === undefined) {
16654
16648
  err[name] = `${getAddressLookupFieldLabel(name)} is required`;
@@ -16658,6 +16652,13 @@ const AddressLookUpControl = props => {
16658
16652
  }
16659
16653
  setSuggestions([]);
16660
16654
  setOpen(false);
16655
+ if (value) {
16656
+ const newAddress = Object.assign({}, address, {
16657
+ addressLine1: value
16658
+ });
16659
+ setAddress(newAddress);
16660
+ updateFormData(newAddress);
16661
+ }
16661
16662
  };
16662
16663
  useEffect(() => {
16663
16664
  if (dropdownRef.current && activeIndex !== -1) {
@@ -16787,7 +16788,7 @@ const AddressLookUpControl = props => {
16787
16788
  placeholder: "Start typing the first line of your address, required.",
16788
16789
  value: (address == null ? void 0 : address.addressLine1) || '',
16789
16790
  onChange: detail => handleDropdownChange(detail.value),
16790
- onBlur: detail => handleRequiredFieldBlur(detail.name),
16791
+ onBlur: detail => handleRequiredFieldBlur(detail.name, detail.value),
16791
16792
  width: "100%",
16792
16793
  onKeyPress: detail => {
16793
16794
  if (open) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.57.0",
3
+ "version": "2.57.1",
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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-03-20T15:52:41.902Z",
4
- "sourceCommit": "aa3a0d1881ea0990b3ed15d966fe93ef1d5ebaf1",
3
+ "generatedAt": "2026-03-20T20:48:23.927Z",
4
+ "sourceCommit": "9d4706f8e093666845671f3e06863206bceba3d5",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 32,
7
7
  "renderers": [