Skip to content
Snippets Groups Projects
Commit 0b0d3563 authored by Christos's avatar Christos
Browse files

Merge branch 'tools' into 'master'

fix rest appearing empty

See merge request !90
parents a2a3a3e9 25bfb827
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 }) => {
DisplayTitle = isFunction(title) ? title : () => title;
tools.forEach(tool => {
tool.hideOnToolbar
tool.hideOnToolbar && tool.isDisplayed()
? rest.push(tool.renderTool(view))
: toolsShown.push(tool.renderTool(view));
});
......
......@@ -20,13 +20,13 @@ export default class ToolGroup {
if (include.includes(tool.constructor.name)) {
tool.displayTool();
} else {
tool.notDisplayTool();
tool.hideTool();
}
});
} else {
this._tools.map(tool => {
if (exclude.includes(tool.constructor.name)) {
tool.notDisplayTool();
tool.hideTool();
}
});
}
......
......@@ -55,11 +55,15 @@ export default class Tools {
) : null;
}
notDisplayTool() {
displayTool() {
this._isDisplayed = true;
}
hideTool() {
this._isDisplayed = false;
}
displayTool() {
this._isDisplayed = true;
isDisplayed() {
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