Skip to content

Commit 8b5c8ad

Browse files
committed
Merge branch 'feature/new-ui'
2 parents 9fafc5f + 307101c commit 8b5c8ad

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

plugins/populator/frontend/public/javascripts/countly.common.populator.js

+10
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,16 @@
982982
};
983983
},
984984
methods: {
985+
addedTag: function(val) {
986+
var lastInserted = val[val.length - 1];
987+
var lastInsertedIndex = val.length - 1;
988+
lastInserted.split(",").forEach(function(tag) {
989+
if (tag.length && val.indexOf(tag) < 0) {
990+
val.push(tag);
991+
}
992+
});
993+
val.splice(lastInsertedIndex, 1);
994+
},
985995
isAddEventDisabled: function(editedObject) {
986996
return editedObject.events && editedObject.events.length && editedObject.events.slice(-1)[0].eventName === '';
987997
},

plugins/populator/frontend/public/templates/template_drawer.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h4 class="bu-mb-4">{{ i18n('populator.custom-user-props') }}</h4>
3030
<cly-tooltip-icon></cly-tooltip-icon>
3131
</div>
3232
<div>
33-
<el-select class="custom-value" :collapse-tags="false" :placeholder="i18n('populator.enter-your-values')" v-model="drawerScope.editedObject.up[index].value" multiple filterable allow-create></el-select>
33+
<el-select class="custom-value" @change="addedTag" :collapse-tags="false" :placeholder="i18n('populator.enter-your-values')" v-model="drawerScope.editedObject.up[index].value" multiple filterable allow-create></el-select>
3434
</div>
3535
</div>
3636
</div>
@@ -70,7 +70,7 @@ <h4 class="bu-mb-4">{{ i18n('populator.events') }}</h4>
7070
<cly-tooltip-icon></cly-tooltip-icon>
7171
</div>
7272
<div>
73-
<el-select v-model="drawerScope.editedObject.events[index].segments[segmentIndex].value" class="custom-value" :collapse-tags="false" multiple filterable allow-create></el-select>
73+
<el-select v-model="drawerScope.editedObject.events[index].segments[segmentIndex].value" @change="addedTag" class="custom-value" :collapse-tags="false" multiple filterable allow-create></el-select>
7474
</div>
7575
</div>
7676
<div class="bu-is-flex bu-is-flex-direction-column bu-ml-2 bu-is-justify-content-center">

0 commit comments

Comments
 (0)