Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion samples/inputs/combo/selection/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
Data="Data"
ValueKey="Id"
DisplayKey="Name"
@ref="Combo">
@ref="Combo"
@bind-value="selectedValue">
</IgbCombo>

<div class="button-container">
Expand All @@ -25,12 +26,24 @@
<IgbButton @onclick="SelectAll">Select All</IgbButton>
<IgbButton @onclick="DeselectAll">Deselect All</IgbButton>
</div>

<p>Selected Id:
@string.Join(", ", selectedValue)</p>

<p>
Selected Names:
@string.Join(", ", Data.Where(c => selectedValue.Contains(c.Id))
.Select(c => c.Name))
</p>

</div>

@code {
private List<City> Data;
private IgbCombo<string> Combo;
private object[] UKCities;
private string[] selectedValue = new string[] { };


protected override void OnInitialized() {
this.Data = SampleData.Cities;
Expand Down
10 changes: 6 additions & 4 deletions samples/maps/geo-map/display-azure-imagery/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ igc-dialog::part(content) {
editor.Properties.Add(azureImageryDropDown);
azureImageryDropDown.Changed += EditorChangeAzureImagery;

// Ensure the dialog is rendered before showing
await InvokeAsync(async () =>
// Queue back into Blazor sync context
_ = InvokeAsync(async () =>
{
await Task.Delay(1000); // allow Blazor to complete rendering
if (DialogRef != null)
// shorter delay should be fine
await Task.Delay(1000);

if (DialogRef is not null)
{
await DialogRef.ShowAsync();
}
Expand Down