|
1 | 1 | /* eslint-disable @typescript-eslint/no-invalid-this */ |
2 | 2 | import { act } from '@testing-library/react'; |
3 | | -import { _rs as onEsResize } from 'rc-resize-observer/es/utils/observerUtil'; |
4 | | -import { _rs as onLibResize } from 'rc-resize-observer/lib/utils/observerUtil'; |
| 3 | +import { _rs as onEsResize } from '@rc-component/resize-observer/es/utils/observerUtil'; |
| 4 | +import { _rs as onLibResize } from '@rc-component/resize-observer/lib/utils/observerUtil'; |
5 | 5 | import React from 'react'; |
6 | 6 | import Tabs from '../../src'; |
7 | 7 | import type { TabsProps } from '../../src/Tabs'; |
@@ -67,18 +67,6 @@ export function getOffsetSizeFunc(info: HackInfo = {}) { |
67 | 67 | return this.querySelector('.rc-tabs-nav-add') ? more + add : more; |
68 | 68 | } |
69 | 69 |
|
70 | | - // if (this.className.includes('rc-tabs-nav-list')) { |
71 | | - // return info.list || 5 * 20 + 10; |
72 | | - // } |
73 | | - // if (this.className.includes('rc-tabs-nav-add')) { |
74 | | - // return info.add || 10; |
75 | | - // } |
76 | | - // if (this.className.includes('rc-tabs-nav-operations')) { |
77 | | - // return info.operation || 10; |
78 | | - // } |
79 | | - // if (this.className.includes('rc-tabs-nav-more')) { |
80 | | - // return info.more || 10; |
81 | | - // } |
82 | 70 | if (this.className.includes('rc-tabs-dropdown')) { |
83 | 71 | return dropdown; |
84 | 72 | } |
@@ -158,10 +146,6 @@ export function getTabs(props: TabsProps = null) { |
158 | 146 | ); |
159 | 147 | } |
160 | 148 |
|
161 | | -// export function triggerResize(wrapper: ReactWrapper) { |
162 | | -// (wrapper.find('.rc-tabs-nav').find('ResizeObserver').first().props() as any).onResize(); |
163 | | -// } |
164 | | - |
165 | 149 | export const triggerResize = (container: Element) => { |
166 | 150 | const target = container.querySelector('.rc-tabs-nav'); |
167 | 151 |
|
|
0 commit comments