# Tab Selected is not correct

**URL:** <https://forum.radzen.com/t/tab-selected-is-not-correct/5729>\
**Category:** Radzen.Blazor Components\
**Created:** [November 20, 2020, 10:24pm UTC](https://forum.radzen.com/t/tab-selected-is-not-correct/5729 "2020-11-20T22:24:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [November 21, 2020, 6:00pm UTC](https://forum.radzen.com/t/tab-selected-is-not-correct/5729/4 "2020-11-21T18:00:37Z")

</div>

I think the Blazor documentation article that I linked explains it very well. It contains an example which uses both Expanded property and private In short Blazor renders components upon change and set the parameter properties. If the component keeps the state it gets overwritten. This [bit us hard](https://github.com/dotnet/AspNetCore.Docs/issues/17178) in the early days. Hence there is Selected and IsSelected.

Basically you use either SelectedIndex or the Selected property of a tab (but not both) to set the selected tab (setting Selected overrides SelectedIndex). To get the selected index you either use @bind-SelectedIndex or check the IsSelected of the tab.

---

_[View the full topic](https://forum.radzen.com/t/tab-selected-is-not-correct/5729)._
