Skip to content

Commit

Permalink
[FIX]: clear d3-grouped-area data when save the config
Browse files Browse the repository at this point in the history
  • Loading branch information
GopherJ committed Sep 10, 2018
1 parent 7e4e761 commit d2d23a1
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/store/LayoutGridStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,6 @@ const mutations = {
for (let i = 0, l = layout.length; i < l; i += 1) {
state.layout.push(layout[i]);
}
},
SEARCH_LAYOUT_ITEM(state, searchString) {
const re = new RegExp(searchString, 'i');
const layout = state.layout;

for (let i = 0, l = layout.length; i < l; i += 1) {
const layoutItem = layout[i];

if (re.test(layoutItem.title) || re.test(layoutItem.is) || re.test(layoutItem.i)) {
Object.assign(layoutItem, {
show: true
});
} else {
Object.assign(layoutItem, {
show: false
});
}
}
}
};

Expand Down Expand Up @@ -112,6 +94,7 @@ const getters = {
case 'd3-timeline':
case 'd3-timelion':
case 'd3-multi-line':
case 'd3-grouped-area':
case 'd3-area':
layoutItem.data.data = [];
break;
Expand Down

0 comments on commit d2d23a1

Please sign in to comment.