Skip to content

Instantly share code, notes, and snippets.

View mepatterson's full-sized avatar

M. E. Patterson mepatterson

View GitHub Profile
@mepatterson
mepatterson / README.md
Created September 8, 2020 22:09 — forked from leastbad/README.md
Choices.js Stimulus wrapper preview

Choices.js Stimulus wrapper

https://joshuajohnson.co.uk/Choices/

Soon, this will be published as an NPM package, but there's an absence of documentation right now. It supports almost all functions from the original library; soon it will support 100% of them.

This wrapper adds Ajax pre-fetch search. Happens if controller has a data-search-path attribute.

Stimulus controller targets use new v2 syntax. Controller attaches a reference to itself on the element so that you can access the internal state from external scripts.