Skip to content

Commit

Permalink
BugFix ComponentRestrictions doesnt work in AutoComplete #99
Browse files Browse the repository at this point in the history
  • Loading branch information
valentasm committed Feb 3, 2021
1 parent ea45d6d commit badc537
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GoogleMapsComponents/GoogleMapsComponents.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<PackageId>BlazorGoogleMaps</PackageId>
<Version>1.0.7</Version>
<Version>1.0.8</Version>
<Authors>Rungwiroon</Authors>
<Company>QueueStack Solution</Company>
<Product>BlazorGoogleMaps</Product>
Expand Down
2 changes: 1 addition & 1 deletion GoogleMapsComponents/Maps/Places/ComponentRestrictions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ namespace GoogleMapsComponents.Maps.Places
{
public class ComponentRestrictions
{
public OneOf<string,string[]> Country { get; set; }
public string[] Country { get; set; }
}
}
4 changes: 3 additions & 1 deletion ServerSideDemo/Pages/MapAutocomplete.razor
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@

private async Task OnAfterMapInit()
{

this.autocomplete = await Autocomplete.CreateAsync(this.map1.JsRuntime, this.searchBox, new AutocompleteOptions
{
StrictBounds = false
StrictBounds = false,
//ComponentRestrictions = new ComponentRestrictions { Country = new[] { "us" } }
});

//await autocomplete.SetFields(new []{ "address_components", "geometry", "icon", "name" });
Expand Down

0 comments on commit badc537

Please sign in to comment.