|
<SfButton OnClick="click" Content="Select Chip"></SfButton>
<SfChip @ref="SfChipSet1" Selection="SelectionType.Single">
<ChipItems>
<ChipItem Text="Whenever" Value="whenever"></ChipItem>
<ChipItem Text="At time" Value="attime"></ChipItem>
</ChipItems>
</SfChip>
@code{
SfChip SfChipSet1;
private void click()
{
string[] chips = { "attime" };
SfChipSet1.SelectChips(chips);
}
}
|
|
<SfChip @ref="SfChipSet1" SelectedChips="chips" Selection="SelectionType.Multiple">
<ChipItems>
<ChipItem Text="Whenever" Value="whenever"></ChipItem>
<ChipItem Text="At time" Value="attime"></ChipItem>
</ChipItems>
</SfChip>
@code{
SfChip SfChipSet1;
string[] chips = { "attime", "whenever"};
}
|
Should be possible to have a generic value in the chip Value property, so we can pass a selected T type back thru the event. String type is too limited.
Hi Preben,
We have considered the scenario "Provide generic type support for property SelectedChips in Blazor Chips component" as a feature which will be included in any of our upcoming releases. Generally, we will plan and implement the features based upon the feature rank, customer request count, and wish-list plan. You can track the status of this feature through the below portal link.
Feedback link: https://www.syncfusion.com/feedback/28429/provide-support-for-string-array-data-source-in-listview
We appreciate your patience.
Regards,
Indhumathy L