v10 #216
Replies: 4 comments 7 replies
-
Your changelog has very little information :-) I just downloaded https://raw.githubusercontent.com/TarekRaafat/autoComplete.js/v10/dist/js/autoComplete.js and will take a look! One thing I see immediately is; right now, in 9.1.x, if I add a custom element to the list I need to do this result.addEventListener("click", ev => {
ev.stopPropagation()
}) to prevent autoComplete.js from running its click handler and closing the list. But of course this is not very futureproof or robust. Now, in your v10 changes, I think I can do |
Beta Was this translation helpful? Give feedback.
-
Without reading the code in detail, I'm worried how this will react to custom elements added to the list: var resultItemElement = ctx.resultItem.element.toUpperCase()
var items = Array.from(ctx.list.children)
var item = event.target.closest(resultItemElement)
if (item && item.nodeName === resultItemElement) {
event.preventDefault()
var index = items.indexOf(item) - 1
selectItem(ctx, event, index)
} |
Beta Was this translation helpful? Give feedback.
-
Is this a bug? 361 var selectItem = function selectItem(ctx, event, index) {
362 index = index > -1 ? index : ctx.cursor
363 var list = ctx.list.getElementsByTagName(ctx.resultItem.element)
364 list[index]
365 var data = ctx.dataFeedback Look at line 364, what does that do? |
Beta Was this translation helpful? Give feedback.
-
For #207 maybe add something like eventEmitter(
{
input: ctx.input,
error: err,
},
"data-store-error"
) When the dataStore Promise fails? It seems like it ends up silently ignored in the debounce just like in v9.x. But maybe you have other ideas for my question in #207 :-) |
Beta Was this translation helpful? Give feedback.
-
Hello All,
v10 is just around the corner, and I'm looking forward to hearing your great ideas and suggestions on what would you like to have in the upcoming major version.
I've already tackled several new use cases and baked a lot of new features that will make
autoComplete.js
more powerful, capable, and easy to use. Let me share them with you for some inspiration.inputField
wrapping insideDIV
resultsList
scrollingresultsList
rendering and navigationeventEmitters
ARIA
support1- Cursor "selection" position
2- Cursor previous position
3-
resultsList
close
andopen
API4-
resultsList
navigation API with and without index5-
resultsList
open state API5- Result selection API by index
6- Events API
7-
dataFeedback
APICan't wait to hear your thoughts and ideas!
Cheers, and have a nice day! :)
Beta Was this translation helpful? Give feedback.
All reactions