@uiw/react-json-view 2.0.0-alpha.23 → 2.0.0-alpha.24
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/cjs/section/Ellipsis.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.EllipsisComp = exports.Ellipsis = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
8
9
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _Section = require("../store/Section");
|
|
@@ -37,7 +38,7 @@ var EllipsisComp = exports.EllipsisComp = function EllipsisComp(_ref) {
|
|
|
37
38
|
keyName: keyName
|
|
38
39
|
});
|
|
39
40
|
if (child) return child;
|
|
40
|
-
if (!isExpanded) return null;
|
|
41
|
+
if (!isExpanded || (0, _typeof2["default"])(value) === 'object' && Object.keys(value).length == 0) return null;
|
|
41
42
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Elm, (0, _objectSpread2["default"])({}, reset));
|
|
42
43
|
};
|
|
43
44
|
EllipsisComp.displayName = 'JVR.EllipsisComp';
|
package/esm/section/Ellipsis.js
CHANGED
|
@@ -34,7 +34,7 @@ export var EllipsisComp = _ref => {
|
|
|
34
34
|
keyName
|
|
35
35
|
});
|
|
36
36
|
if (child) return child;
|
|
37
|
-
if (!isExpanded) return null;
|
|
37
|
+
if (!isExpanded || typeof value === 'object' && Object.keys(value).length == 0) return null;
|
|
38
38
|
return /*#__PURE__*/_jsx(Elm, _extends({}, reset));
|
|
39
39
|
};
|
|
40
40
|
EllipsisComp.displayName = 'JVR.EllipsisComp';
|