AsyncSelect 不会更改加载消息,也不会更改选项消息(反应选择库)

Oma*_*imi 5 reactjs react-select

我一直在尝试自定义react-select AsyncSelect 加载消息和无选项消息,但到目前为止没有运气。

这是我当前的代码:

                    <AsyncSelect
                        noOptionsMessage={() => 'nothing found'}
                        LoadingMessage={() => 'searching...'}
                        cacheOptions
                        loadOptions={searchForPointsOfInterest}
                        getOptionLabel={(option) => option.name}
                        getOptionValue={(option) => option}
                        defaultOptions
                        isRtl={true}
                        isClearable={true}
                        placeholder="example"
                        isLoading={isLoading}
                        onChange={onPointOfInterestChange}
                        defaultValue={props.area}
                    />
Run Code Online (Sandbox Code Playgroud)

Pas*_*sVV 4

我已经准备好了沙箱。请检查一下。除了错误的loadingMessage道具名称之外,我没有看到任何错误。