JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.55k stars 4.12k forks source link

Uncaught TypeError: noOptionsMessage2 is not a function #5634

Closed AyubTouba closed 1 year ago

AyubTouba commented 1 year ago

Hello,

I'm using SelectAsync, and when there's no data and I click on the select input, it returns

lect-457c486b.esm.js:2345 Uncaught TypeError: noOptionsMessage2 is not a function at Select2.renderMenu (Select-457c486b.esm.js:2345:24) at Select2.render (Select-457c486b.esm.js:2509:143) at finishClassComponent (react-dom.development.js:19752:31) at updateClassComponent (react-dom.development.js:19698:24) at beginWork (react-dom.development.js:21611:16) at HTMLUnknownElement.callCallback2 (react-dom.development.js:4164:14) at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16) at invokeGuardedCallback (react-dom.development.js:4277:31) at beginWork$1 (react-dom.development.js:27451:7) at performUnitOfWork (react-dom.development.js:26557:12) r My code : <AsyncSelect noOptionsMessage={() => t("INFORMATION.NOOPTION")} cacheOptions loadOptions={loadOptions} defaultOptions id={name} name={name} onChange={onChangeHandler} placeholder={t("ACTION.SELECTOPTION")} value={value} />

Version I use: "react-select": "^5.7.2",