summaryrefslogtreecommitdiff
path: root/autocomplete.js
AgeCommit message (Collapse)Author
2022-01-05treshold -> thresholdEvgeny Zinoviev
2021-09-21added showValueBeforeLabel optionEvgeny Zinoviev
2021-05-20Forgot one showValuesp00n
2021-05-20Renamed to displayLabelWithValue to showValuesp00n
2021-05-20Added a displayLabelWithValue optionsp00n
Setting displayLabelWithValue to true will display the value after the label in the dropdown. Also added a couple of missing semicolons.
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-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-03-31set focus to first suggestion by down arrow keyChristophe
2021-03-31render again if data has changedChristophe
2021-02-01fix issue #1Evgeny Zinoviev
2021-01-03initial commitEvgeny Zinoviev