Comments (9)
So you're changing opts
in the onInputKeyDown
handler?
Instead of using options
and onInputKeyDown
, have you considered using loadOptions
? That's the official mechanism for supplying options asynchronously in response to the user's search query.
from react-select-plus.
What's going on in that onInputKeyDown
handler? If you remove that line, does the Select behave normally?
from react-select-plus.
When i gave an input from my keyboard a service is called through redux saga. Am i missing a property and my list is not refreshed? It looks like even if my state is updating the list is not updating instantly. Only after onBlur and then onFocus the list is updating
from react-select-plus.
Hmm nice thought Trevor. I'm gonna give it a try and i 'll inform you. Close the issue if you wish to and i'm going to inform you if this approach will properly :)
from react-select-plus.
I've change the options to loadOptions. Now the list is not rendering at all
from react-select-plus.
What does your loadOptions
function look like?
from react-select-plus.
My loadOptions is exactly the same as my options function beacause when the service is called i save my state with the exact same way:
const clientsIdArray = Array.from(clients.keys());
const opts = clientsIdArray.map((client) => {
const lastName = clients.getIn([client, 'lastName']);
const exchangeCode = clients.getIn([client, 'exchangeCode']);
const customer = `${lastName}(${exchangeCode})`;
const portArray = clients.getIn([client, 'portfolioCode']).toArray();
if (portArray.find(i => i.includes('#'))) {
portArray.push(portArray.splice(portArray.indexOf(portArray.find(i => i.includes('#'))), 1)[0]);
}
const typesArray = [];
for (let i = 0; i < portArray.length; i += 1) {
typesArray[i] = portfolios.getIn([portArray[i], 'type']);
}
const finalTypesArray = typesArray
.filter(value => value !== undefined);
if (finalTypesArray.includes('DERIV')) {
finalTypesArray.push(finalTypesArray.splice(finalTypesArray.indexOf('DERIV'), 1)[0]);
}
return {
label: customer,
value: client,
options: finalTypesArray.map((value, i) =>
({ label: value, value: portArray[i] }))
};
});
and then optios ={opts} or loadOptions={opts}
from react-select-plus.
You can chech a same issue as mine. He is not using loadOptions as i see https://stackoverflow.com/questions/43072867/use-async-react-select-with-redux-saga
from react-select-plus.
I don't know how to help you. React Select is not a pure component. It may be fundamentally incompatible with redux-saga, unless you can interact with redux-saga through loadOptions
.
from react-select-plus.
Related Issues (20)
- Possible to select groups? HOT 1
- Custom options for Group HOT 3
- Please update to react-select 1.2.0 HOT 2
- OptionGroup throws errors when setting dragging property
- Async multi-select sometimes hides the menu incorrectly after selecting a value HOT 1
- Option Groups are not searchable
- Remove Selected not working
- Force drop-down menu to open HOT 8
- Non-clearable Selects can be cleared (with backspace) HOT 1
- Cannot select menu items on mobile
- Huge problem with infinite loop options into group. HOT 1
- Remove Selected Disables Options
- Search input clears on selection
- Not work with react-datepicker HOT 1
- delete key is not affecting input text
- No supports for react 16+ HOT 4
- possible to trigger onChange event from outside of component ??
- TypeError: Cannot read property 'string' of undefined HOT 3
- If I use the cdn links to import react-select-plus, Then how to use CreatableSelect? Its not working by importing.
- Trying to get in touch regarding a security issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-select-plus.