JedWatson / JedWatson/react-select
RollUp JS: TypeError: Cannot read property 'inputValue' of undefined
Open
Nobody has claimed this yet.
awaiting-author-response
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
package.json
"react-select": "^2.4.1",
File CountryPicker.js:
import React, { Component } from 'react';
import Select from 'react-select';
const options: Object = [
{value: 'chocolate', label: 'Chocolate'},
{value: 'strawberry', label: 'Strawberry'},
{value: 'vanilla', label: 'Vanilla'}
];
class CountryPicker extends Component {
render () {
return (
<Select options={options} inputValue={'strawberry'}/>
);
}
}
Usage:
class App extends React.Component {
render () {
return <CountryPicker/>;
}
}
// Always starts once doom
document.addEventListener('DOMContentLoaded', () => {
/** @type {HTMLDivElement} */
let elm = document.querySelector('div#root');
// noinspection ES6ModulesDependencies
ReactDOM.render(<App />, elm);
});
And the rest:
TypeError: Cannot read property 'inputValue' of undefined
at new StateManager (react-select.esm.js:4559)
at Yf (react-dom.production.min.js:67)
at qg (react-dom.production.min.js:92)
at hi (react-dom.production.min.js:104)
at Qg (react-dom.production.min.js:144)
at Rg (react-dom.production.min.js:145)
at Sc (react-dom.production.min.js:158)
at Z (react-dom.production.min.js:156)
at Kc (react-dom.production.min.js:155)
at ya (react-dom.production.min.js:153)
Contributor guide
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 package.json and the CountryPicker.js reproduction using react-select 2.4.1, then trace the StateManager constructor shown in the stack trace. Confirm the error with the provided App example and identify the change needed so rendering no longer throws the inputValue TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100