@webitel/ui-sdk 2.1.12 → 2.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ui-sdk.common.js +25 -9
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +25 -9
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +1 -1
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/wt-tags-input/wt-tags-input.vue +9 -0
- package/src/locale/en/en.js +1 -0
- package/src/locale/ru/ru.js +1 -0
- package/src/locale/ua/ua.js +1 -0
package/package.json
CHANGED
|
@@ -125,6 +125,15 @@ export default {
|
|
|
125
125
|
[this.trackBy]: id || searchQuery,
|
|
126
126
|
} : searchQuery;
|
|
127
127
|
|
|
128
|
+
const isTagExist = (newTag) => {
|
|
129
|
+
if (typeof newTag === 'string') {
|
|
130
|
+
return this.options.some((elem) => elem === newTag);
|
|
131
|
+
}
|
|
132
|
+
return this.options.some((elem) => elem[this.trackBy] === newTag[this.trackBy]);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (isTagExist(tag)) return;
|
|
136
|
+
|
|
128
137
|
this.options.unshift(tag);
|
|
129
138
|
if (!this.manualTagging) {
|
|
130
139
|
const value = [...this.value, tag];
|
package/src/locale/en/en.js
CHANGED
package/src/locale/ru/ru.js
CHANGED