azavea/OTM2 — pull request #1084 by ahinz (2014-02-03 19:48:25+00:00)
Title: Allow address search after polygon search

We support arbitrary address search by detecting when a typeahead did
not match a valid choice. In such a case a 'data-unmatched' attribute
was set on the typeahead.

The code looked something like:

```js
inputStream($input)
.combine(idStream.toProperty("").skipDuplicates(),
firstIfSecondIsEmptyElseEmpty)
.onValue($input, 'attr', 'data-unmatched');
```

However, the idStream sticks on the last value which is what led to this
bug. For instance, if idStream was set to '2900' because of a successful
match the combinator would never trigger the `onValue` with a proper
values.

The solution is to `merge` the streams. Whenever a selection is made the
`data-unmatched` attribute is cleared and whenever a change is made to
the input it is put back.

Fixes #1062