Skip to content

Commit

Permalink
Fixed selected address issue (#2)
Browse files Browse the repository at this point in the history
Fixed issue where selected address what not populating unit, floor, building or apartment details.
  • Loading branch information
ryanmichaeljames authored Oct 23, 2019
1 parent 84155e5 commit 105dfef
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/AddressFinderWidget/ControlManifest.Input.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<manifest>
<control namespace="Pcf" constructor="AddressFinderWidget" version="1.1.15" display-name-key="AddressFinder Widget" description-key="AddressFinder Widget" control-type="standard">
<control namespace="Pcf" constructor="AddressFinderWidget" version="1.1.16" display-name-key="AddressFinder Widget" description-key="AddressFinder Widget" control-type="standard">
<property name="address_line_1" display-name-key="Line 1" description-key="The address line 1." of-type="SingleLine.Text" usage="bound" required="false" />
<property name="address_line_2" display-name-key="Line 2" description-key="The address line 2." of-type="SingleLine.Text" usage="bound" required="false" />
<property name="city" display-name-key="City" description-key="The address city." of-type="SingleLine.Text" usage="bound" required="false" />
Expand Down
13 changes: 8 additions & 5 deletions src/AddressFinderWidget/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ export class AddressFinderWidget implements ComponentFramework.StandardControl<I
);

this.Widget.on("result:select", (fullAddress: any, metaData: any) => {
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();
});
Expand Down
2 changes: 1 addition & 1 deletion src/solution/Other/Solution.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<LocalizedName description="AddressFinder Widget" languagecode="1033" />
</LocalizedNames>
<Descriptions />
<Version>1.1.15</Version>
<Version>1.1.16</Version>
<!-- Solution Package Type: Unmanaged(0)/Managed(1)/Both(2)-->
<Managed>2</Managed>
<Publisher>
Expand Down

0 comments on commit 105dfef

Please sign in to comment.