react-component / react-component/tabs
TypeError: Cannot read property 'offsetWidth' of null
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 572
- Forks
- 241
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 4
Description
Using antd tabs in one of my projects and getting this error in rc-tabs
I did see issue #300 so I updated antd and rc-tabs, but the error is still happening.
Unhandled Runtime Error
TypeError: Cannot read property 'offsetWidth' of null
Call Stack
eval
node_modules/rc-tabs/es/TabNavList/index.js (313:0)
Array.forEach
<anonymous>
eval
node_modules/rc-tabs/es/TabNavList/index.js (309:0)
eval
node_modules/rc-tabs/es/hooks/useRaf.js (40:0)
Array.forEach
<anonymous>
eval
node_modules/rc-tabs/es/hooks/useRaf.js (39:0)
eval
node_modules/rc-tabs/es/hooks/useRaf.js (16:0)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rc-tabs/es/TabNavList/index.js around lines 309-313 and hooks/useRaf.js around lines 16, 39-40, then reproduce using an antd tabs setup. Done means the reported offsetWidth null error no longer occurs in the reported scenario; the issue provides no test or reproduction repository to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100