Skip to content

Commit d7b5552

Browse files
committed
Add onTagRemoved faeture
1 parent f566c07 commit d7b5552

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/input-tags.component.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,21 @@ class InputTags {
5959
}
6060

6161
removeTag(tag) {
62+
63+
if (this.onTagRemoving) {
64+
this.onTagRemoving(tag);
65+
}
66+
6267
for (let i = this.tags.length - 1; i >= 0; i--) {
6368
if (this.tags[i].code === tag.code) {
6469
this.tags.splice(i, 1);
6570
}
6671
}
6772

68-
if (this.onTagRemoving) {
69-
this.onTagRemoving(tag);
73+
if (this.onTagRemoved) {
74+
this.onTagRemoved(tag);
7075
}
76+
7177
return tag;
7278
}
7379

@@ -106,6 +112,7 @@ const InputTagsComponent = {
106112
onTagAdded: '<',
107113
onTagAddFailed: '<',
108114
onTagRemoving: '<',
115+
onTagRemoved: '<',
109116
onTagClicked: '<'
110117
}
111118
};

0 commit comments

Comments
 (0)