Skip to content

Commit 542c32a

Browse files
committed
v1.6.1
1 parent f99a771 commit 542c32a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

dist/vue-typed-ui.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* vue-typed-ui 1.6.0
2+
* vue-typed-ui 1.6.1
33
* UI components made with Semantic UI, VueTyped and friends
44
* https://github.com/vue-typed/vue-typed-ui
55
@@ -1427,6 +1427,7 @@ var Dropdown = function (_DropdownBase2) {
14271427
var _this = possibleConstructorReturn(this, (Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).apply(this, arguments));
14281428

14291429
_this.selectedItems = undefined;
1430+
_this._htmlItems = '';
14301431
return _this;
14311432
}
14321433

@@ -1435,7 +1436,21 @@ var Dropdown = function (_DropdownBase2) {
14351436
value: function createComponent(ch) {
14361437
var css = 'ui selection dropdown';
14371438
if (this.css) css += ' ' + this.css;
1438-
return ch('div', { 'class': css }, [ch('input', { attrs: { type: 'hidden', name: this.name } }), ch('i', { 'class': 'dropdown icon' }), ch('div', { 'class': 'default text' }, this.placeholder), ch('div', { 'class': 'menu' }, this.$slots['default'])]);
1439+
return ch('div', { 'class': css }, [ch('input', { attrs: { type: 'hidden', name: this.name } }), ch('i', { 'class': 'dropdown icon' }), ch('div', { 'class': 'default text' }, this.placeholder), ch('div', { 'class': 'menu', 'ref': 'menu' }, this.$slots['default'])]);
1440+
}
1441+
}, {
1442+
key: 'beforeUpdate',
1443+
value: function beforeUpdate() {
1444+
// store dropdown items state
1445+
this._htmlItems = this.$refs['menu'].innerHTML;
1446+
}
1447+
}, {
1448+
key: 'updated',
1449+
value: function updated() {
1450+
// refresh dropdown when items has been changed
1451+
if (this._htmlItems !== this.$refs['menu'].innerHTML) {
1452+
this.sui('refresh');
1453+
}
14391454
}
14401455
}, {
14411456
key: 'mounted',

0 commit comments

Comments
 (0)