-
Notifications
You must be signed in to change notification settings - Fork 234
Doesn't work for multiple inputs #229
Comments
Hi @lodenrogue, for now you need to instantiate it twice: one per input. I will make this clearer |
autocomplete.js is compliant with multiple inputs binding; we should be able to support it. |
Ok thanks. |
This is different here I believe because you would want different events given the start or end inputs, thus getting a single instance of places.js when bound on different inputs does not make sense in this use case. |
Right; eventually we should be able to rely on the underlying |
@lodenrogue you can do this: var start = places({container: document.querySelector('#start-input')});
var end = places({container: document.querySelector('#end-input')}); Given that your html looks like this: <input type="text" id="start-input">
<input type="text" id="end-input"> |
## [1.0.2](v1.0.1...v1.0.2) (2016-06-20) ### Bug Fixes * **errors:** precise error messages on some bad usage ([dc8f0e1](dc8f0e1)), closes [#229](#229) * **inputValue:** when name is a country, there should be no comma (#234) ([5e56c39](5e56c39)) * **src:** Fix ESLint configuration issue under /src/ for #231 (#232) ([0a60d4c](0a60d4c)), closes [#231](#231) [#232](#232) * **website:** fix json response, thanks [@dzello](https:/dzello) for the heads up ([de9d87f](de9d87f))
Thanks |
I created a start address and end address input and gave them both the same class. I referenced the class in places -> container but the functionality only works for the first input not the second.
Please take a look at the source code if you have any questions: http://pastebin.com/huQx5X1F
The text was updated successfully, but these errors were encountered: