Skip to content

Commit 47ca6eb

Browse files
Merge pull request #1181 from IgniteUI/mkirkova/refactor-chip-samples
Add handleChipRemove for all chip samples
2 parents e66b955 + feae2ac commit 47ca6eb

12 files changed

Lines changed: 40 additions & 9 deletions

File tree

samples/inputs/chip/multiple/App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
<div class="container sample center size-medium" style="flex-direction: row; gap: 8px">
5-
<IgbChip Selectable="true" Removable="true">
5+
<IgbChip Selectable="true" Removable="true" RemoveScript="handleChipRemove">
66
<span slot="select">
77
<IgbIcon @ref="@SelectIconRef" IconName="custom-select" Collection="material" ></IgbIcon>
88
</span>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function handleChipRemove(event) {
2+
const chip = event.target;
3+
chip.remove();
4+
}
5+
igRegisterScript("handleChipRemove", handleChipRemove, false);

samples/inputs/chip/multiple/wwwroot/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<title>Samples | IgniteUI for Blazor | Infragistics</title>
1111
<base href="/" />
1212
<link href="https://static.infragistics.com/xplatform/images/browsers/blazor.ico" rel="icon" type="image/x-icon">
13-
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v6.css" type="text/css" />
13+
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v6.css" type="text/css" />
1414
<link href="https://static.infragistics.com/xplatform/css/samples/blazor.css" rel="stylesheet" />
1515
<link href="_content/IgniteUI.Blazor/themes/light/bootstrap.css" rel="stylesheet" />
1616
</head>
@@ -25,6 +25,7 @@
2525
<!-- importing blazor bundle for IG controls: -->
2626
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
2727
<script src="_framework/blazor.webassembly.js"></script>
28+
<script src="events.js"></script>
2829

2930
</body>
3031

samples/inputs/chip/overview/App.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33

44
<div class="container sample vertical">
5-
<IgbChip class="size-medium" Selectable=true Removable=true> Chip
5+
<IgbChip class="size-medium" Selectable=true Removable=true RemoveScript="handleChipRemove">
6+
Chip
67
</IgbChip>
78
</div>
89

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function handleChipRemove(event) {
2+
const chip = event.target;
3+
chip.remove();
4+
}
5+
igRegisterScript("handleChipRemove", handleChipRemove, false);

samples/inputs/chip/overview/wwwroot/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<!-- importing blazor bundle for IG controls: -->
2626
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
2727
<script src="_framework/blazor.webassembly.js"></script>
28+
<script src="events.js"></script>
2829

2930
</body>
3031

samples/inputs/chip/styling/App.razor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@using IgniteUI.Blazor.Controls
22

33
<div class="container sample vertical">
4-
<IgbChip class="size-medium" Selectable=true Removable=true> Chip
4+
<IgbChip class="size-medium" Selectable=true Removable=true RemoveScript="handleChipRemove">
5+
Chip
56
</IgbChip>
67
</div>
78

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function handleChipRemove(event) {
2+
const chip = event.target;
3+
chip.remove();
4+
}
5+
igRegisterScript("handleChipRemove", handleChipRemove, false);

samples/inputs/chip/styling/wwwroot/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<!-- importing blazor bundle for IG controls: -->
2626
<script src="_content/IgniteUI.Blazor/app.bundle.js"></script>
2727
<script src="_framework/blazor.webassembly.js"></script>
28+
<script src="events.js"></script>
2829

2930
</body>
3031

samples/inputs/chip/variants/App.razor

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@
22

33

44
<div class="container sample center" style="flex-direction: row; gap: 8px">
5-
<IgbChip Variant="StyleVariant.Primary" Selectable="true" Removable="true"> Primary
5+
<IgbChip Variant="StyleVariant.Primary" Selectable="true" Removable="true" RemoveScript="handleChipRemove">
6+
Primary
67
</IgbChip>
78

8-
<IgbChip Variant="StyleVariant.Info" Selectable="true" Removable="true"> Info
9+
<IgbChip Variant="StyleVariant.Info" Selectable="true" Removable="true" RemoveScript="handleChipRemove">
10+
Info
911
</IgbChip>
1012

11-
<IgbChip Variant="StyleVariant.Success" Selectable="true" Removable="true"> Success
13+
<IgbChip Variant="StyleVariant.Success" Selectable="true" Removable="true" RemoveScript="handleChipRemove">
14+
Success
1215
</IgbChip>
1316

14-
<IgbChip Variant="StyleVariant.Warning" Selectable="true" Removable="true"> Warning
17+
<IgbChip Variant="StyleVariant.Warning" Selectable="true" Removable="true" RemoveScript="handleChipRemove">
18+
Warning
1519
</IgbChip>
1620

17-
<IgbChip Variant="StyleVariant.Danger" Selectable="true" Removable="true"> Danger
21+
<IgbChip Variant="StyleVariant.Danger" Selectable="true" Removable="true" RemoveScript="handleChipRemove">
22+
Danger
1823
</IgbChip>
1924
</div>
2025

0 commit comments

Comments
 (0)