Fix dropdown hint reset when changing tabs

This commit is contained in:
Clement Ho 2016-12-15 23:08:49 -06:00
parent 98189f37c9
commit d19303cbe1
1 changed files with 9 additions and 1 deletions

View File

@ -59,7 +59,15 @@
renderContent() {
this.droplab.changeHookList(this.hookId, this.dropdown, [droplabFilter], this.config);
this.droplab.setData(this.hookId, dropdownData);
// Clone dropdownData to prevent it from being
// changed due to pass by reference
const data = [];
dropdownData.forEach((item) => {
data.push(Object.assign({}, item));
});
this.droplab.setData(this.hookId, data);
}
init() {