vikramlearning / blazorbootstrap

An Enterprise-class Blazor Bootstrap Component library built on the Blazor and Bootstrap CSS frameworks.
https://docs.blazorbootstrap.com/
Apache License 2.0
734 stars 38 forks source link

Tabs - get active tab #813

Closed lartusi closed 3 months ago

lartusi commented 3 months ago

Maybe I missed it in the documentation. But, how can I get the active tab object or the active tab's name?

Thank you!

gvreddy04 commented 3 months ago

@lartusi Thank you for using BlazorBootstrap. There is no public method available to get the active tab object or name. However, you can capture the active tab object with the OnShown event.

Docs: https://docs.blazorbootstrap.com/components/tabs#tabs-callback-events Demo: https://demos.blazorbootstrap.com/tabs#events-example

lartusi commented 3 months ago

Thank you for the quick reply. In my opinion is better to expose the entire tab object in the TabsEventArgs or at least the Name property.

gvreddy04 commented 3 months ago

@lartusi Will add in the upcoming release.