feat(elements): add isHidden option

This commit is contained in:
moklick
2020-07-15 10:31:16 +02:00
parent 084030dbb2
commit b51a25191f
12 changed files with 129 additions and 13 deletions
+5
View File
@@ -29,6 +29,7 @@ const useElementUpdater = (elements: Elements): void => {
: existingNode.style;
const className = existingNode.className === propNode.className ? existingNode.className : propNode.className;
const isHidden = existingNode.isHidden === propNode.isHidden ? existingNode.isHidden : propNode.isHidden;
const positionChanged =
existingNode.position.x !== propNode.position.x || existingNode.position.y !== propNode.position.y;
@@ -54,6 +55,10 @@ const useElementUpdater = (elements: Elements): void => {
nodeProps.className = className;
}
if (typeof isHidden !== 'undefined') {
nodeProps.isHidden = isHidden;
}
return nodeProps;
}