I'm using the following searchWidget and it works fine, I need to know how can I get location details, once I type something and hit enter. Lets I search for New York and hit enter, then search data should be taken into a variable (search value, location details, etc).
var searchWidget = new Search({
sources:[{
countryCode:"LKR",
placeholder: "Search",
}],
view: this.view,
includeDefaultSources: false,
container : document.createElement("div")
});