小编Oma*_*imi的帖子

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

我一直在尝试自定义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)

reactjs react-select

5
推荐指数
1
解决办法
5318
查看次数

标签 统计

react-select ×1

reactjs ×1