summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-20Update README.mdsp00n
2021-05-20Added the ability to set the label and value key namessp00n
You can now set the names of the `label` and `value` keys in the options. They default to `label` and `value` to not break the current behavior, but you can also set them to `null`, so that you can use a simple object instead of an array of objects, just like in bootstrap-4-autocomplete. Examples: ``` const ac = new Autocomplete(field, { data: [{name: "entry1", text: "The first entry"}, {name: "entry2", text: "The second entry"}], label: "name", value: "text", onSelectItem: ({label, value}) => { console.log("user selected:", label, value); } }); const ac = new Autocomplete(field, { data: {entry1: "The first entry", entry2: "The second entry"}, label: null, value: null, onSelectItem: ({label, value}) => { console.log("user selected:", label, value); } }); ```
2021-05-19Merge pull request #4 from lukasjelonek/masterEvgeny Zinoviev
Fix bug: Navigation with cursor keys does not work
2021-05-19Fix bug: Navigation with cursor keys does not workLukas Jelonek
data toggle field changed from `data-toggle` to `data-bs-toggle`
2021-04-08Merge pull request #3 from CBke/arrowdownkeyEvgeny S
set focus to first suggestion by down arrow key
2021-04-06Merge pull request #2 from CBke/dynamicdataEvgeny S
render again if data has changed
2021-03-31set focus to first suggestion by down arrow keyChristophe
2021-03-31render again if data has changedChristophe
2021-02-01add exampleEvgeny Zinoviev
2021-02-01fix issue #1Evgeny Zinoviev
2021-01-03initial commitEvgeny Zinoviev