Open krzyzak opened 1 year ago
Name | Link |
---|---|
Latest commit | 7bc62b361c38edcd5b2a123e95018ef30d407347 |
Latest deploy log | https://app.netlify.com/sites/stimulus-autocomplete/deploys/6400b091e2730b0008500536 |
This is just the feature I wanted, thanks, but the proposed changes broke my remotely fetched options. Thankfully it was a simple fix, to add parentheses around the use of the ternary operator;
const html = await (this.hasOptionsValue ? this.fetchLocalOptions(query) : ...
Otherwise the wait doesn't apply to the remote fetch!
Hey!
First of all, thank you for this component, it's very useful in my project! As a follow-up to #116, I added possibility to pass
options
Array, which then can be used in the component.It also exposes 2 methods:
optionMatches
- by default, it does case-insensitive matching, but it can be customised.decorateResult
- which can decorate options with whatever markup is needed in your app.It allows you to pass not only a plain array, but also an array of objects, with different name and values.
I didn't update the docs, nor did I provide any examples, because first I wanted to get your initial feedback on that.