File tree Expand file tree Collapse file tree 2 files changed +110
-2
lines changed
BlazorServerApp/ChipSample/Pages
BlazorWASMApp/ChipSample/Client/Pages Expand file tree Collapse file tree 2 files changed +110
-2
lines changed Original file line number Diff line number Diff line change 11@page " /"
2+ @using Syncfusion .Blazor .Buttons
23
34<SfChip >
45 <ChipItems >
56 <ChipItem Text =" Janet Leverling" ></ChipItem >
67 </ChipItems >
7- </SfChip >
8+ </SfChip >
9+
10+ @if (ChipData .Count != 0 ) {
11+ < SfChip EnableDelete = " true" >
12+ < ChipItems >
13+ @foreach (ChipCollection currentData in ChipData )
14+ {
15+ < ChipItem Text = @currentData .text Enabled = @currentData .enabled > < / ChipItem >
16+ }
17+ < / ChipItems >
18+ < / SfChip >
19+ < SfChip >
20+ < ChipItems >
21+ < ChipItem Text = " Janet Leverling" >< / ChipItem >
22+ < / ChipItems >
23+ < / SfChip >
24+ }
25+
26+ @code {
27+
28+ public List <ChipCollection > ChipData = new List <ChipCollection >();
29+ public class ChipCollection
30+ {
31+ public string text { get ; set ; }
32+ public bool enabled { get ; set ; }
33+ }
34+ protected override async Task OnInitializedAsync ()
35+ {
36+ await base .OnInitializedAsync ();
37+ await Task .Delay (2000 );
38+ ChipData .Add (new ChipCollection
39+ {
40+ text = " Jenifer" ,
41+ enabled = true
42+ });
43+ ChipData .Add (new ChipCollection
44+ {
45+ text = " Amenda" ,
46+ enabled = true
47+ });
48+ ChipData .Add (new ChipCollection
49+ {
50+ text = " Isabella" ,
51+ enabled = true
52+ });
53+ ChipData .Add (new ChipCollection
54+ {
55+ text = " James" ,
56+ enabled = true
57+ });
58+
59+ }
60+ }
Original file line number Diff line number Diff line change 11@page " /"
2+ @using Syncfusion .Blazor .Buttons
23
34<SfChip >
45 <ChipItems >
56 <ChipItem Text =" Janet Leverling" ></ChipItem >
67 </ChipItems >
7- </SfChip >
8+ </SfChip >
9+
10+ <SfChip >
11+ <ChipItems >
12+ <ChipItem Text =" Janet Leverling" ></ChipItem >
13+ </ChipItems >
14+ </SfChip >
15+
16+ @if (ChipData .Count != 0 ) {
17+ < SfChip EnableDelete = " true" >
18+ < ChipItems >
19+ @foreach (ChipCollection currentData in ChipData )
20+ {
21+ < ChipItem Text = @currentData .text Enabled = @currentData .enabled > < / ChipItem >
22+ }
23+ < / ChipItems >
24+ < / SfChip >
25+
26+ }
27+
28+ @code {
29+
30+ public List <ChipCollection > ChipData = new List <ChipCollection >();
31+ public class ChipCollection
32+ {
33+ public string text { get ; set ; }
34+ public bool enabled { get ; set ; }
35+ }
36+ protected override async Task OnInitializedAsync ()
37+ {
38+ await base .OnInitializedAsync ();
39+ await Task .Delay (2000 );
40+ ChipData .Add (new ChipCollection
41+ {
42+ text = " Jenifer" ,
43+ enabled = true
44+ });
45+ ChipData .Add (new ChipCollection
46+ {
47+ text = " Amenda" ,
48+ enabled = true
49+ });
50+ ChipData .Add (new ChipCollection
51+ {
52+ text = " Isabella" ,
53+ enabled = true
54+ });
55+ ChipData .Add (new ChipCollection
56+ {
57+ text = " James" ,
58+ enabled = true
59+ });
60+
61+ }
62+ }
You can’t perform that action at this time.
0 commit comments