Skip to content

Commit

Permalink
Merge pull request #108 from FriendsOfCake/improve-selectizer-options
Browse files Browse the repository at this point in the history
Improve selectizer options
  • Loading branch information
lorenzo committed Feb 16, 2016
2 parents a91e28d + f67b4c6 commit 2caf719
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webroot/js/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ $(document).on('ready', function() {
$('input.autocomplete, select.autocomplete').each(function (i, e) {
e = $(e);
e.selectize({
maxItems: 1,
create: !$(e).data('exact-match'),
maxItems: e.data('max-items') || 1,
maxOptions: e.data('max-options') || 10,
hideSelected: e.data('hide-selected'),
closeAfterSelect: e.data('close-after-select'),
create: !e.data('exact-match'),
persist: false,
render: {
'option_create': function(data, escape) {
Expand Down

0 comments on commit 2caf719

Please sign in to comment.