@banyan_cloud/roots 1.0.131 → 1.0.133

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 CHANGED
@@ -47899,7 +47899,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
47899
47899
  tabIndex: -1,
47900
47900
  "data-elem": "table-row",
47901
47901
  onClick: function onClick() {
47902
- return onRowClick(datum, setActiveId);
47902
+ return onRowClick(props);
47903
47903
  },
47904
47904
  className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]),
47905
47905
  children: tableCells
@@ -47968,6 +47968,7 @@ var TableBody = function TableBody(props) {
47968
47968
  onRowClick = props.onRowClick,
47969
47969
  defaultActiveIndex = props.defaultActiveIndex;
47970
47970
  var listRef = React.useRef([]);
47971
+ var isActiveRef = React.useRef(false);
47971
47972
  return /*#__PURE__*/jsxRuntime.jsx("tbody", {
47972
47973
  "data-elem": "table-body",
47973
47974
  className: classes(modules_82c0c387.root, className),
@@ -47978,6 +47979,7 @@ var TableBody = function TableBody(props) {
47978
47979
  var multiSelect = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
47979
47980
  if (reset) {
47980
47981
  var _listRef$current, _listRef$current$_ind, _listRef$current$_ind2;
47982
+ isActiveRef.current = false;
47981
47983
  (_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');
47982
47984
  } else {
47983
47985
  var _listRef$current3, _listRef$current3$_in, _listRef$current3$_in2;
@@ -47988,13 +47990,14 @@ var TableBody = function TableBody(props) {
47988
47990
  elem === null || elem === void 0 ? void 0 : (_elem$removeAttribute = elem.removeAttribute) === null || _elem$removeAttribute === void 0 ? void 0 : _elem$removeAttribute.call(elem, 'data-active');
47989
47991
  });
47990
47992
  }
47993
+ isActiveRef.current = true;
47991
47994
  (_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);
47992
47995
  }
47993
47996
  };
47994
47997
  return /*#__PURE__*/jsxRuntime.jsx(TableRow, {
47995
47998
  ref: function ref(node) {
47996
47999
  listRef.current[_index] = node;
47997
- if (!(node !== null && node !== void 0 && node.getAttribute('data-active')) && defaultActiveIndex === _index) {
48000
+ if (!isActiveRef.current && defaultActiveIndex === _index) {
47998
48001
  node === null || node === void 0 ? void 0 : node.setAttribute('data-active', true);
47999
48002
  }
48000
48003
  },
@@ -111291,7 +111294,7 @@ var Toggle = /*#__PURE__*/React.forwardRef(function Toggle(props, ref) {
111291
111294
  leftComponent = item.leftComponent,
111292
111295
  rightComponent = item.rightComponent,
111293
111296
  itemClassName = item.className;
111294
- var isActive = inputValue.indexOf(itemValue) !== -1 && !allSelected;
111297
+ var isActive = inputValue === itemValue && !allSelected;
111295
111298
  return /*#__PURE__*/jsxRuntime.jsx(Button, {
111296
111299
  size: "auto",
111297
111300
  "data-elem": "toggle",