react-component / react-component/table
Cannot read properties of null (reading 'endsWith')
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 618
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 2
Description
I got this bug when use virtual and set column width to null
Uncaught TypeError: Cannot read properties of null (reading 'endsWith')
at parseColWidth (useWidthColumns.js:8:1)
at useWidthColumns.js:26:1
at Array.forEach (<anonymous>)
at useWidthColumns.js:25:1
at mountMemo (react-dom.development.js:17225:1)
at Object.useMemo (react-dom.development.js:17670:1)
at Object.useMemo (react.development.js:1650:1)
at useWidthColumns (useWidthColumns.js:18:1)
at useColumns (index.js:252:1)
at Table (Table.js:158:1)
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 in useWidthColumns.js at parseColWidth and follow its call from useWidthColumns, as shown in the stack trace. Reproduce a virtual table with a column width of null, then ensure this input no longer causes the reported TypeError and verify the table's resulting column-width behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100