When clicking on a tab to drag it to reorder, it will process the tab change as soon as the tab is clicked to start a drag operation. Preferably, we'd like the tab select action to only happen on a mouseup instead of a mousedown (and cancelled on drag.) This is a reproduction in the REPL: https://blazorrepl.telerik.com/mAayPpGb59GjWvUT47. But it so simple that you probably don't need it. This is the main razor file:
@page "/tabstrip/overview"
@page "/tabstrip/index"
<div class="demo-section">
<TelerikTabStrip
ActiveTabIdChanged="@OnTabChangeAsync"
OnStateChanged="@OnTabStateChangeAsync"
OverflowMode="@TabStripOverflowMode.Menu"
EnableTabReorder="true"
Height="100%"
Width="100%"
PersistTabContent="true">
<TabStripTab Title="Sofia">
<WeatherCard City="Sofia"
TempC="23"
Forecast="ForecastType.Sunny">
</WeatherCard>
</TabStripTab>
<TabStripTab Title="London">
<WeatherCard City="London"
TempC="21"
Forecast="ForecastType.Cloudy">
</WeatherCard>
</TabStripTab>
<TabStripTab Title="Paris">
<WeatherCard City="Paris"
TempC="17"
Forecast="ForecastType.Rainy">
</WeatherCard>
</TabStripTab>
</TelerikTabStrip>
<h2>Active Tab Index: @ActiveTabIndex </h2>
</div>
@code {
public int ActiveTabIndex { get; set; } = 1;
public async Task OnTabChangeAsync(string newTabId) {
await Task.CompletedTask;
}
public async Task OnTabStateChangeAsync(TabStripStateEventArgs args) {
await Task.CompletedTask;
}
}
<style>
.box {
margin: 4.5em 7.5em;
padding: 3em;
background-color: rgba(20,53,80,0.038);
border: 1px solid rgba(20,53,80,0.05);
}
.demo-section {
margin: 0 auto;
padding: 3em;
border: 1px solid rgba(20,53,80,0.14);
box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);
}
.auto {
max-width: max-content;
}
.demo-section:not(.wide):not(.auto),
.box:not(.wide):not(.auto) {
max-width: 500px;
}
.box:after,
.demo-section:after {
content: ";
display: block;
clear: both;
height: 0;
}
.box {
margin: 4.5em auto;
}
.box:first-child {
margin-top: 0;
}
.center {
text-align: center;
}
.demo-section.editor {
max-width: 100%;
border: none;
}
.demo-alert {
font: normal 18px "Metric";
border-radius: 2px;
margin: 20px auto 40px auto;
padding: 20px;
border-left: 4px solid;
}
.demo-alert-success {
border-left-color: rgb(55,180,0);
background: rgba(55,180,0, 0.1);
}
.demo-alert-info {
border-left-color: rgb(83,146,228);
background: rgba(83,146,228, 0.1);
}
.demo-alert-error {
border-left-color: rgb(243, 23, 0);
background: rgba(243, 23, 0, 0.1);
}
.demo-alert-warning {
border-left-color: rgb(255, 192, 0);
background: rgba(255, 192, 0, 0.1);
}
</style>