@banyan_cloud/roots 1.0.131 → 1.0.132
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/cjs/index.js +5 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -47879,7 +47879,7 @@ var TableRow = /*#__PURE__*/forwardRef(function BaseTable(props, ref) {
|
|
|
47879
47879
|
tabIndex: -1,
|
|
47880
47880
|
"data-elem": "table-row",
|
|
47881
47881
|
onClick: function onClick() {
|
|
47882
|
-
return onRowClick(
|
|
47882
|
+
return onRowClick(props);
|
|
47883
47883
|
},
|
|
47884
47884
|
className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]),
|
|
47885
47885
|
children: tableCells
|
|
@@ -47948,6 +47948,7 @@ var TableBody = function TableBody(props) {
|
|
|
47948
47948
|
onRowClick = props.onRowClick,
|
|
47949
47949
|
defaultActiveIndex = props.defaultActiveIndex;
|
|
47950
47950
|
var listRef = useRef([]);
|
|
47951
|
+
var isActiveRef = useRef(false);
|
|
47951
47952
|
return /*#__PURE__*/jsx("tbody", {
|
|
47952
47953
|
"data-elem": "table-body",
|
|
47953
47954
|
className: classes(modules_82c0c387.root, className),
|
|
@@ -47958,6 +47959,7 @@ var TableBody = function TableBody(props) {
|
|
|
47958
47959
|
var multiSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
47959
47960
|
if (reset) {
|
|
47960
47961
|
var _listRef$current, _listRef$current$_ind, _listRef$current$_ind2;
|
|
47962
|
+
isActiveRef.current = false;
|
|
47961
47963
|
(_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : (_listRef$current$_ind = _listRef$current[_index]) === null || _listRef$current$_ind === void 0 ? void 0 : (_listRef$current$_ind2 = _listRef$current$_ind.removeAttribute) === null || _listRef$current$_ind2 === void 0 ? void 0 : _listRef$current$_ind2.call(_listRef$current$_ind, 'data-active');
|
|
47962
47964
|
} else {
|
|
47963
47965
|
var _listRef$current3, _listRef$current3$_in, _listRef$current3$_in2;
|
|
@@ -47968,13 +47970,14 @@ var TableBody = function TableBody(props) {
|
|
|
47968
47970
|
elem === null || elem === void 0 ? void 0 : (_elem$removeAttribute = elem.removeAttribute) === null || _elem$removeAttribute === void 0 ? void 0 : _elem$removeAttribute.call(elem, 'data-active');
|
|
47969
47971
|
});
|
|
47970
47972
|
}
|
|
47973
|
+
isActiveRef.current = true;
|
|
47971
47974
|
(_listRef$current3 = listRef.current) === null || _listRef$current3 === void 0 ? void 0 : (_listRef$current3$_in = _listRef$current3[_index]) === null || _listRef$current3$_in === void 0 ? void 0 : (_listRef$current3$_in2 = _listRef$current3$_in.setAttribute) === null || _listRef$current3$_in2 === void 0 ? void 0 : _listRef$current3$_in2.call(_listRef$current3$_in, 'data-active', true);
|
|
47972
47975
|
}
|
|
47973
47976
|
};
|
|
47974
47977
|
return /*#__PURE__*/jsx(TableRow, {
|
|
47975
47978
|
ref: function ref(node) {
|
|
47976
47979
|
listRef.current[_index] = node;
|
|
47977
|
-
if (!
|
|
47980
|
+
if (!isActiveRef.current && defaultActiveIndex === _index) {
|
|
47978
47981
|
node === null || node === void 0 ? void 0 : node.setAttribute('data-active', true);
|
|
47979
47982
|
}
|
|
47980
47983
|
},
|