Skip to content

Commit

Permalink
Merge pull request #212 from webitel/fix/multiply-in-wt-tags-input
Browse files Browse the repository at this point in the history
@24.4.10Fix: multiply in wt-tags-input[WTEL-4310]
  • Loading branch information
dlohvinov authored Mar 13, 2024
2 parents 19714bf + 265ee5a commit 18782b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "24.4.9",
"version": "24.4.10",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/components/wt-tags-input/__tests__/WtTagsInput.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('WtTagsInput', () => {
},
});
wrapper.findComponent({ name: 'vue-multiselect' }).vm.$emit('tag', tag);
expect(wrapper.emitted().input[0]).toEqual([tag]);
expect(wrapper.emitted().input[0][0]).toEqual([tag]);
});

it('in manual mode doesnt emit "input" event at native "tag" event', () => {
Expand Down
7 changes: 6 additions & 1 deletion src/components/wt-tags-input/wt-tags-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
:label="selectOptionLabel"
:loading="false"
:model-value="selectValue"
:multiple="multiple"
:options="selectOptions"
:placeholder="placeholder || label"
:taggable="taggable"
:track-by="trackBy"
class="wt-tags-input__select"
multiple
v-bind="$attrs"
v-on="listeners"
>
Expand Down Expand Up @@ -138,6 +138,11 @@ export default {
emits: ['input', 'tag', 'search-change', 'closed'],
data: () => ({
defaultOptionLabel: 'label',
// [https://webitel.atlassian.net/browse/WTEL-4310]
// Multiple value is needed in TaggableMixin mixin to correctly add custom values
multiple: true,
}),
methods: {
getTagOptionLabel({ optionLabel, option }) {
Expand Down

0 comments on commit 18782b1

Please sign in to comment.