diff --git a/src/BootstrapBlazor.Shared/Shared/MainLayout.razor b/src/BootstrapBlazor.Shared/Shared/MainLayout.razor index d60957d4084a21115128360c7b15468972af78a8..353c28f3bc248853ee619fea4d3b258b6a9263a3 100644 --- a/src/BootstrapBlazor.Shared/Shared/MainLayout.razor +++ b/src/BootstrapBlazor.Shared/Shared/MainLayout.razor @@ -3,7 +3,7 @@
diff --git a/src/BootstrapBlazor/Components/Select/Select.razor b/src/BootstrapBlazor/Components/Select/Select.razor index 972e79ae421e5eb317ad3e7d9c7d806087cabafb..b73e5ab498485d513bdf1370ccde3e74b239f47d 100644 --- a/src/BootstrapBlazor/Components/Select/Select.razor +++ b/src/BootstrapBlazor/Components/Select/Select.razor @@ -52,7 +52,6 @@ @if (!Initialized && SelectedItem != null && OnSelectedItemChanged != null) { Initialized = true; - OnSelectedItemChanged.Invoke(SelectedItem); } diff --git a/src/BootstrapBlazor/Components/Select/Select.razor.cs b/src/BootstrapBlazor/Components/Select/Select.razor.cs index 5a9b7398e7b0eb8ca3f03d254fc0fd58a5c42b89..3a258023c7287ddc0817070704d35fe0adb2a46e 100644 --- a/src/BootstrapBlazor/Components/Select/Select.razor.cs +++ b/src/BootstrapBlazor/Components/Select/Select.razor.cs @@ -96,6 +96,10 @@ namespace BootstrapBlazor.Components Interop = new JSInterop>(JSRuntime); } await Interop.Invoke(this, SelectElement, "bb_select", nameof(ConfirmSelectedItem)); + if (Initialized && SelectedItem != null && OnSelectedItemChanged != null) + { + await OnSelectedItemChanged.Invoke(SelectedItem); + } } }