Minor flow issue in 3.1.0 update #4176
Labels
issue/bug-unconfirmed
Issues that describe a bug that hasn't been confirmed by a maintainer yet
issue/reviewed
Issue has recently been reviewed (mid-2020)
First and foremost, thanks to all the people who are involved in this awesome project.
Are you reporting a bug or runtime error?
Setup up issue.
This is a flow error issue when using Async Select component. This was introduced in #3690 with changes in
isLoading
prop.Can't reproduce in sandbox as this is related to setup.
Reproduction steps
yarn flow check
The reproduction code is just the fork of this repository with a single component file using the Async Select.
https://github.com/vikalp-sajwan/react-select/blob/master/packages/react-select/src/Async-flow-test-component.js
Issue
Issue Cause
Not sure, but seems the
defaultProps
value defined in Select.js is making it interpret as optional prop, which in turn means it could beundefined
, causing the issue.Possible Solution
Making the isLoading prop optional is fixing the issue.
Are you making a feature request?
No
The text was updated successfully, but these errors were encountered: