From 105dfef592051870b599d084b971b881259fa438 Mon Sep 17 00:00:00 2001 From: Ryan James Date: Thu, 24 Oct 2019 09:56:10 +1300 Subject: [PATCH] Fixed selected address issue (#2) Fixed issue where selected address what not populating unit, floor, building or apartment details. --- src/AddressFinderWidget/ControlManifest.Input.xml | 2 +- src/AddressFinderWidget/index.ts | 13 ++++++++----- src/solution/Other/Solution.xml | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/AddressFinderWidget/ControlManifest.Input.xml b/src/AddressFinderWidget/ControlManifest.Input.xml index 308b22d..e6a1a9f 100644 --- a/src/AddressFinderWidget/ControlManifest.Input.xml +++ b/src/AddressFinderWidget/ControlManifest.Input.xml @@ -1,6 +1,6 @@ - + diff --git a/src/AddressFinderWidget/index.ts b/src/AddressFinderWidget/index.ts index dbeecdf..1e5f50f 100644 --- a/src/AddressFinderWidget/index.ts +++ b/src/AddressFinderWidget/index.ts @@ -97,11 +97,14 @@ export class AddressFinderWidget implements ComponentFramework.StandardControl { - this._address_line_1 = metaData.address_line_1 != null ? metaData.address_line_1 : ""; - this._address_line_2 = metaData.address_line_2 != null ? metaData._address_line_2 : ""; - this._city = metaData.city != null ? metaData.city : ""; - this._suburb = metaData.suburb != null ? metaData.suburb : ""; - this._postcode = metaData.postcode != null ? metaData.postcode : ""; + + var selected = new this.AddressFinder.NZSelectedAddress(fullAddress, metaData); + + this._address_line_1 = selected.address_line_1(); + this._address_line_2 = selected.address_line_2(); + this._suburb = selected.suburb(); + this._city = selected.city(); + this._postcode = selected.postcode(); this._country = "New Zealand"; this._notifyOutputChanged(); }); diff --git a/src/solution/Other/Solution.xml b/src/solution/Other/Solution.xml index 928ce47..817677c 100644 --- a/src/solution/Other/Solution.xml +++ b/src/solution/Other/Solution.xml @@ -8,7 +8,7 @@ - 1.1.15 + 1.1.16 2