@chlp-tech/rpa-ui 0.0.15-beta-1 → 0.0.16
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/dist/video-list/index.js
CHANGED
|
@@ -43,7 +43,9 @@ var VideoList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43
43
|
footerStyle = _ref.footerStyle,
|
|
44
44
|
selectedIds = _ref.selectedIds,
|
|
45
45
|
_ref$isLoading = _ref.isLoading,
|
|
46
|
-
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading
|
|
46
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
47
|
+
_ref$cardCanCheck = _ref.cardCanCheck,
|
|
48
|
+
cardCanCheck = _ref$cardCanCheck === void 0 ? false : _ref$cardCanCheck;
|
|
47
49
|
var _useState = useState([]),
|
|
48
50
|
_useState2 = _slicedToArray(_useState, 2),
|
|
49
51
|
checkedIds = _useState2[0],
|
|
@@ -168,7 +170,13 @@ var VideoList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
168
170
|
}, /*#__PURE__*/React.createElement("div", {
|
|
169
171
|
ref: isFirstItem ? itemRef : null,
|
|
170
172
|
className: "".concat(styles.video_wrap, " ").concat(checkedIds.includes(video.id) ? styles.selected : ""),
|
|
171
|
-
style: style
|
|
173
|
+
style: style,
|
|
174
|
+
onClick: function onClick() {
|
|
175
|
+
if (cardCanCheck) {
|
|
176
|
+
var checked = !checkedIds.includes(video.id);
|
|
177
|
+
handleCheck(video.id, checked);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
172
180
|
}, /*#__PURE__*/React.createElement("div", {
|
|
173
181
|
style: {
|
|
174
182
|
position: "relative",
|