Skip to content
Snippets Groups Projects
Commit 25bfb827 authored by chris's avatar chris
Browse files

fix rest appearing empty

parent a2a3a3e9
No related branches found
No related tags found
1 merge request!90fix rest appearing empty
...@@ -31,7 +31,7 @@ const ToolGroupComponent = ({ view, tools, name, title }) => { ...@@ -31,7 +31,7 @@ const ToolGroupComponent = ({ view, tools, name, title }) => {
DisplayTitle = isFunction(title) ? title : () => title; DisplayTitle = isFunction(title) ? title : () => title;
tools.forEach(tool => { tools.forEach(tool => {
tool.hideOnToolbar tool.hideOnToolbar && tool.isDisplayed()
? rest.push(tool.renderTool(view)) ? rest.push(tool.renderTool(view))
: toolsShown.push(tool.renderTool(view)); : toolsShown.push(tool.renderTool(view));
}); });
......
...@@ -20,13 +20,13 @@ export default class ToolGroup { ...@@ -20,13 +20,13 @@ export default class ToolGroup {
if (include.includes(tool.constructor.name)) { if (include.includes(tool.constructor.name)) {
tool.displayTool(); tool.displayTool();
} else { } else {
tool.notDisplayTool(); tool.hideTool();
} }
}); });
} else { } else {
this._tools.map(tool => { this._tools.map(tool => {
if (exclude.includes(tool.constructor.name)) { if (exclude.includes(tool.constructor.name)) {
tool.notDisplayTool(); tool.hideTool();
} }
}); });
} }
......
...@@ -55,11 +55,15 @@ export default class Tools { ...@@ -55,11 +55,15 @@ export default class Tools {
) : null; ) : null;
} }
notDisplayTool() { displayTool() {
this._isDisplayed = true;
}
hideTool() {
this._isDisplayed = false; this._isDisplayed = false;
} }
displayTool() { isDisplayed() {
this._isDisplayed = true; return this._isDisplayed;
} }
} }
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