@lobehub/charts 1.3.0 → 1.4.0
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/es/Legend/index.js +4 -3
- package/package.json +1 -1
package/es/Legend/index.js
CHANGED
|
@@ -22,7 +22,6 @@ var useStyles = createStyles(function (_ref) {
|
|
|
22
22
|
};
|
|
23
23
|
});
|
|
24
24
|
var Legend = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
25
|
-
var _hasScroll$left, _hasScroll$right;
|
|
26
25
|
var _useStyles = useStyles(),
|
|
27
26
|
cx = _useStyles.cx,
|
|
28
27
|
styles = _useStyles.styles;
|
|
@@ -117,6 +116,8 @@ var Legend = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
117
116
|
scrollable === null || scrollable === void 0 || scrollable.removeEventListener('keyup', keyUp);
|
|
118
117
|
};
|
|
119
118
|
}, [checkScroll, enableLegendSlider]);
|
|
119
|
+
|
|
120
|
+
// @ts-ignore
|
|
120
121
|
return /*#__PURE__*/_jsxs(Flexbox, _objectSpread(_objectSpread({
|
|
121
122
|
className: cx(styles.container, className),
|
|
122
123
|
gap: 8,
|
|
@@ -152,14 +153,14 @@ var Legend = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
152
153
|
justify: 'center',
|
|
153
154
|
ref: scrollButtonsRef,
|
|
154
155
|
children: [/*#__PURE__*/_jsx(ScrollButton, {
|
|
155
|
-
disabled:
|
|
156
|
+
disabled: !(hasScroll !== null && hasScroll !== void 0 && hasScroll.left),
|
|
156
157
|
icon: ChevronLeft,
|
|
157
158
|
onClick: function onClick() {
|
|
158
159
|
setIsKeyDowned(null);
|
|
159
160
|
scrollToTest('left');
|
|
160
161
|
}
|
|
161
162
|
}), /*#__PURE__*/_jsx(ScrollButton, {
|
|
162
|
-
disabled:
|
|
163
|
+
disabled: !(hasScroll !== null && hasScroll !== void 0 && hasScroll.right),
|
|
163
164
|
icon: ChevronRight,
|
|
164
165
|
onClick: function onClick() {
|
|
165
166
|
setIsKeyDowned(null);
|