uiw 4.21.10 → 4.21.11

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/uiw.js CHANGED
@@ -10530,14 +10530,14 @@ function Tabs(props) {
10530
10530
  flowNavSet(_extends({}, flowNav));
10531
10531
  }
10532
10532
  }, []);
10533
- var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key, itemKey) => {
10533
+ var divNavRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)((node, key, itemKey, activeKey) => {
10534
10534
  if (node !== null) {
10535
- node.addEventListener('click', e => {
10536
- activeItem.current = node;
10537
- });
10535
+ // node.addEventListener('click', (e: any) => {
10536
+ // activeItem.current = node;
10537
+ // });
10538
10538
  divNavWidthChange(node.getBoundingClientRect().width, key);
10539
10539
 
10540
- if (itemKey === props.activeKey && type === 'line' && labelWidth === 0) {
10540
+ if (itemKey === activeKey) {
10541
10541
  activeItem.current = node;
10542
10542
  }
10543
10543
  }
@@ -10573,7 +10573,7 @@ function Tabs(props) {
10573
10573
  }
10574
10574
  };
10575
10575
 
10576
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => setActiveKey(props.activeKey), [props.activeKey]);
10576
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => setActiveKey((props == null ? void 0 : props.activeKey) || ''), [props.activeKey]);
10577
10577
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => calcSlideStyle(), [activeKey]);
10578
10578
 
10579
10579
  function calcSlideStyle() {
@@ -10656,7 +10656,7 @@ function Tabs(props) {
10656
10656
  }
10657
10657
 
10658
10658
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", _extends({
10659
- ref: _ref => divNavRef(_ref, key, item.key)
10659
+ ref: _ref => divNavRef(_ref, key, item.key, activeKey)
10660
10660
  }, divProps), key);
10661
10661
  });
10662
10662
  }