Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: AutoComplete.js v2.0 (tarekraafat.github.io)
93 points by TarekRaafat on Dec 23, 2018 | hide | past | favorite | 14 comments


Please add up/down arrow support, add a great deal to accessibility.


And just all round usability; you're typing to get the autocomplete suggestions anyway, keyboard navigation to the suggestions is just more convenient.


second that


That's nice, but usually I need more features like multiselect, html-formatted option rows in the dropdown, etc.

Currently I use Selectize.js and Chosen.js:

https://github.com/selectize/selectize.js

https://github.com/harvesthq/chosen



Why should this be used over Fuse.js? https://github.com/krisk/Fuse


Fun fact, Fuse.js uses a copy of a Google bitap implementation[0].

They originally[1] mentioned this, but the license was removed[2] when the moved some files around.

[0]: https://github.com/google/diff-match-patch/blob/master/javas... [1]: https://github.com/krisk/Fuse/commit/42b082fb1607ddc74e3d848... [2]: https://github.com/krisk/Fuse/commit/ad2f06a39a483a75e7c697d...


Fuse appears to be search engine, and OP is sharing the autocompletion component for use in interface.


After a (slightly more than) cursory skimming through the code, AutoComplete appears to be an auto complete library without fuzzy searching (i.e. searching 'comptuer' would not match 'computer') that has a built in approach for showing why the library matched the results (i.e. searching 'comp' would show 'computer' as a result with the 'comp' part highlighted).

Fuse.js is purely just a fuzzy searching library. It's entirely up to the developer to do the front end (including the highlighting).

Based on AutoComplete.js's roadmap [0], it's pretty clear OP intends for this to become Fuse.js but with a front end component added on top.

[0] Primarily item 'Sort rendered results': https://tarekraafat.github.io/autoComplete.js/#/?id=_6-roadm...


I am aware of what Fuse.js does and what fuzzy matching is ;)

However if project is named "autocomplete 2.0" (which is an UI concept first) and your landing page focuses on search input with suggestions, it's safe to assume whats the focus of the library.


I was personally confused about what OP's library does. When I think "autocomplete", I personally think of fuzzy searching a la search engines. The library's docs [0] don't ever actually say what the library is for. In fact, all the docs's header says is:

> autoComplete.js is a simple pure vanilla Javascript library that's progressively designed for speed, high versatility and seamless integration with wide range of projects & systems.

In that sentence, the only thing that hints at the library's purpose is the word "autocomplete." All of the other words could be applied to any "pure vanilla Javascript library."

[0]: https://tarekraafat.github.io/autoComplete.js


The term autocomplete is actually surprisingly well defined


React has made all these things unnecessary for me. These are cool libraries but when you learn React you can code something like this exactly how you want it, quickly and easily.


Is there a way to set options /filters?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: