-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add item data to awesomplete-select event #16835
Add item data to awesomplete-select event #16835
Conversation
@LeaVerou I believe now I have a very good implementation for data support in different formats (key/value objects, arrays, etc.). But I need |
O'm also waiting for this to update #16795 accordingly |
da7573c
to
dd4db90
Compare
48ca757
to
dd4db90
Compare
@TxHawks Please don't update your #16795 yet when (and if) this PR is merged. The next PR I have in mind would make the whole key/value story much simpler. If all goes as I imaging it, we can split your PR into 2: The one that adds selected element property to The second one with example of how to work with array of objects. This one can be totally unrelated to added event properties if my second PR will be accepted. Or maybe it can show the usage of event properties in addition to just using an array of objects. Smaller PRs have better chance to be merged soon and this will cleanup the commit history of #16795 since it looks like the final implementation will look very different from what it was in the beginning. |
@vlazar 👍 |
Ok with merging once the helper function is added on |
…plete-select-event Add item data to awesomplete-select event
I made this PR as minimal as possible just to add new property to
awesomplete-select
event.However I think if this one is merged, later we should expose
this._suggestions
as publicthis.suggestions
property. It's a list of current matched items data. With just this 1 additional property we can do the following in instance methods:Of course we can go further and add public instance properties to match suggested event properties in your comment #16821 (comment)
This will simplify code and be more convenient public API.