@onehat/ui 0.4.42 → 0.4.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.4.42",
3
+ "version": "0.4.43",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -189,7 +189,7 @@ export default function withModal(WrappedComponent) {
189
189
  {isModalShown &&
190
190
  <Modal
191
191
  isOpen={true}
192
- onClose={onCancel}
192
+ onClose={onCancel || (canClose ? hideModal : null)}
193
193
  className="withModal-Modal"
194
194
  {...testProps(testID)}
195
195
  >
@@ -736,8 +736,8 @@ function TreeComponent(props) {
736
736
  }
737
737
 
738
738
  const
739
- depthChildren = await datum.item.loadChildren(depth),
740
- directChildren = _.filter(depthChildren, (child) => { // narrow list to only direct descendants, so buildTreeNodeData can work correctly
739
+ node = await datum.item.loadChildren(depth),
740
+ directChildren = _.filter(node.children, (child) => { // narrow list to only direct descendants, so buildTreeNodeData can work correctly
741
741
  return child.depth === datum.item.depth + 1;
742
742
  });
743
743