# \<select multiple\>...\</select\> yielding value that's 1 interaction old

**URL:** <https://talk.observablehq.com/t/select-multiple-select-yielding-value-thats-1-interaction-old/424>\
**Category:** Help\
**Created:** [February 28, 2018, 7:49pm UTC](https://talk.observablehq.com/t/select-multiple-select-yielding-value-thats-1-interaction-old/424 "2018-02-28T19:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![argyleink](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/argyleink/32/298_2.png) [@argyleink](https://talk.observablehq.com/u/argyleink)\
**Post date:** [February 28, 2018, 7:49pm UTC](https://talk.observablehq.com/t/select-multiple-select-yielding-value-thats-1-interaction-old/424/1 "2018-02-28T19:49:30Z")

</div>

Here’s the notebook I’m working on [https://beta.observablehq.com/@argyleink/an-es6-async-await-functional-programming-party](https://beta.observablehq.com/@argyleink/an-es6-async-await-functional-programming-party)

At the bottom is a multiselect (following a linked inputs pattern), that returns an array as a value on the node, and that value I use with a notebook function to show the map. The issue is that the user interaction with the multiselect is delayed. It feels like a value/generator issue. next() is returning the previous value and putting the current value in the stack for the next value.

Is this a bug with how I’m trying to use the select box?  
Is there somewhere I need to yield a statement to get the engine on track?

The demo feels wonky as it is now, and me and any user is unsure if it’s the demo code or ObservableHQ that’s got the issue.

Here’s a gif of the repro

 ![multiselect-observable](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/1X/3d8b3b8758a6ced83122c6f33d1f0a729f7d7eeb.gif)

---

<div class="post-metadata">

**Author:** ![jashkenas](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jashkenas/32/1778_2.png) [@jashkenas](https://talk.observablehq.com/u/jashkenas)\
**Post date:** [February 28, 2018, 7:52pm UTC](https://talk.observablehq.com/t/select-multiple-select-yielding-value-thats-1-interaction-old/424/2 "2018-02-28T19:52:29Z")

</div>

It seems to me just to be a DOM focus/blur input-vs.-change issue.

Try changing your `onchange` to `oninput`. That works well for me.

---

<div class="post-metadata">

**Author:** ![argyleink](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/argyleink/32/298_2.png) [@argyleink](https://talk.observablehq.com/u/argyleink)\
**Post date:** [February 28, 2018, 7:54pm UTC](https://talk.observablehq.com/t/select-multiple-select-yielding-value-thats-1-interaction-old/424/3 "2018-02-28T19:54:16Z")

</div>

boom, that fixes it.  
🔥😍
