bmcmahen / sancho

Responsive and accessible React UI components built with Typescript
https://sancho-ui.com
411 stars 33 forks source link

State discrepancy when using ComboBox #63

Open aldrio opened 4 years ago

aldrio commented 4 years ago

Callbacks passed to onSelect with ComboBox don't seem to get updated. Here's a demo: https://codesandbox.io/s/compassionate-meadow-ssogf?fontsize=14&hidenavigation=1&theme=dark&file=/src/App.js

When you select an option from the ComboBox (by clicking) it creates an alert dependent on the variable someNum. After changing the value of someNum with the button, you can see that the alert still shows the initial state.