el containercssclass prevenia mostrar el dropdown en multiple:false

https://github.com/yourlabs/django-autocomplete-light/pull/1015
This commit is contained in:
f 2018-06-20 15:00:32 -03:00
parent 6350a33043
commit 9c06220f9b
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 13 additions and 6 deletions

View file

@ -1,11 +1,6 @@
$(document).on('turbolinks:load', function() {
$('.select2').select2({
tags: true,
tokenSeparators: [','],
allowClear: true,
placeholder: '',
theme: 'bootstrap',
containerCssClass: ':all:',
width: ''
});
});

View file

@ -15,6 +15,16 @@ class Post
complex? ? contents.dig('value') : contents
end
def max
return 0 if simple?
contents.fetch('max', 0)
end
def min
return 0 if simple?
contents.fetch('min', 0)
end
def type
return @type if @type

View file

@ -4,6 +4,8 @@
multiple: template.multiple?,
required: template.required?,
data: { tags: template.open?,
placeholder: t('posts.select.placeholder')}}
placeholder: t('posts.select.placeholder'),
'allow-clear': template.multiple?,
'maximum-selection-length': template.max }}
- if template.open?
%small.text-muted.form-text= t('posts.open')