Skip to content

Commit

Permalink
[SAT-184] Allow creating without selecting first (#543)
Browse files Browse the repository at this point in the history
Using the selectOnClose option, select2 will automatically select the
entry if the entered string exists on the list
  • Loading branch information
filipechagas authored Aug 2, 2021
1 parent 63b88dc commit ddf4d71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Public/assets/main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ $(function () {
multiple: true,
allowClear: false,
minimumInputLength: 1,
selectOnClose: true,
placeholder: $("#input-gitignore-placeholder").text(),
sorter: function(results) {
const query = $('.select2-search__field').val().toLowerCase();
Expand Down

0 comments on commit ddf4d71

Please sign in to comment.