Commit d19303cb authored by Clement Ho's avatar Clement Ho

Fix dropdown hint reset when changing tabs

parent 98189f37
...@@ -59,7 +59,15 @@ ...@@ -59,7 +59,15 @@
renderContent() { renderContent() {
this.droplab.changeHookList(this.hookId, this.dropdown, [droplabFilter], this.config); 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() { init() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment