Hi Seil,
Greetings from Syncfusion support.
Q1: The code to close all Tabs
We have checked your reported issue and we suggest you to use RemoveTab public method which helps to remove Tabitems. Also, we have prepared a sample based on your requirement and refer the below code for that.
|
<button @onclick="Click">Remove</button>
<SfTab @ref="TabObj" ShowCloseButton="true">
...
</SfTab>
@code{
public static SfTab TabObj;
public int Count { get; set; }
public void Click()
{
Count = TabObj.Items.Count;
for (int i=0; i< Count; i++)
{
TabObj.RemoveTab(TabObj.Items.Count-1); // To remove all Tabs
}
}
} |
The above sample can be downloaded from the following link.
Q2: How to place the button on the right side of Tab header.
We have validated your requirement and we regret to let you know that the button on the right side of the Tab header is not feasible in our Tab component.
Please let us know, if you need any further assistance.
Regards
Alagumeena.K