@ideal-postcodes/address-finder
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -103,2 +103,6 @@ import { CloseReason } from "./state"; | ||
onUnhide?: OnUnhide; | ||
/** | ||
* Invoked each time context changed (i.e. user change country to search address) | ||
*/ | ||
onContextChange?: OnContextChange; | ||
} | ||
@@ -192,2 +196,5 @@ /** | ||
} | ||
export interface OnContextChange { | ||
(this: Controller, context: string): void; | ||
} | ||
/** | ||
@@ -194,0 +201,0 @@ * @hidden |
@@ -107,2 +107,3 @@ "use strict"; | ||
onCountrySelected: exports.NOOP, | ||
onContextChange: exports.NOOP, | ||
}; | ||
@@ -603,2 +604,3 @@ /** | ||
this.announce(`Country switched to ${details.description}`); | ||
this.options.onContextChange.call(this, context); | ||
} | ||
@@ -605,0 +607,0 @@ /** |
@@ -103,2 +103,6 @@ import { CloseReason } from "./state"; | ||
onUnhide?: OnUnhide; | ||
/** | ||
* Invoked each time context changed (i.e. user change country to search address) | ||
*/ | ||
onContextChange?: OnContextChange; | ||
} | ||
@@ -192,2 +196,5 @@ /** | ||
} | ||
export interface OnContextChange { | ||
(this: Controller, context: string): void; | ||
} | ||
/** | ||
@@ -194,0 +201,0 @@ * @hidden |
@@ -100,2 +100,3 @@ /** | ||
onCountrySelected: NOOP, | ||
onContextChange: NOOP, | ||
}; | ||
@@ -596,2 +597,3 @@ /** | ||
this.announce(`Country switched to ${details.description}`); | ||
this.options.onContextChange.call(this, context); | ||
} | ||
@@ -598,0 +600,0 @@ /** |
{ | ||
"name": "@ideal-postcodes/address-finder", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Address Finder JS library backed by the Ideal Postcodes UK address search API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
245020
7014