diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index aa2492b9004..9c0901e81b8 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 9.7.1-beta01 + 9.7.1-beta02 diff --git a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs index aade7aa6333..c94406b9588 100644 --- a/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs +++ b/src/BootstrapBlazor/Components/BaseComponents/IdComponentBase.cs @@ -29,16 +29,6 @@ public abstract class IdComponentBase : BootstrapComponentBase /// protected virtual string? RetrieveId() => Id; - /// - /// - /// - protected override void OnInitialized() - { - base.OnInitialized(); - - Id ??= ComponentIdGenerator.Generate(this); - } - /// /// /// diff --git a/src/BootstrapBlazor/Components/Tab/TabItem.cs b/src/BootstrapBlazor/Components/Tab/TabItem.cs index da598f638ae..27d1e9d7a5a 100644 --- a/src/BootstrapBlazor/Components/Tab/TabItem.cs +++ b/src/BootstrapBlazor/Components/Tab/TabItem.cs @@ -8,7 +8,7 @@ namespace BootstrapBlazor.Components; /// /// TabItem component /// -public class TabItem : ComponentBase +public class TabItem : IdComponentBase { /// /// Gets or sets the text. Default is null diff --git a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs index 249867bc926..37fac44e95d 100644 --- a/src/BootstrapBlazor/Components/Tab/TabItemContent.cs +++ b/src/BootstrapBlazor/Components/Tab/TabItemContent.cs @@ -15,13 +15,6 @@ internal class TabItemContent : IComponent [Parameter, NotNull] public TabItem? Item { get; set; } - /// - /// Gets instrance - /// - [Inject] - [NotNull] - private IComponentIdGenerator? ComponentIdGenerator { get; set; } - private RenderHandle _renderHandle; void IComponent.Attach(RenderHandle renderHandle) @@ -49,7 +42,7 @@ private void BuildRenderTree(RenderTreeBuilder builder) builder.OpenElement(0, "div"); builder.SetKey(_key); builder.AddAttribute(5, "class", ClassString); - builder.AddAttribute(6, "id", ComponentIdGenerator.Generate(Item)); + builder.AddAttribute(6, "id", Item.Id); builder.AddContent(10, Item.ChildContent); builder.CloseElement(); }