el containercssclass prevenia mostrar el dropdown en multiple:false
https://github.com/yourlabs/django-autocomplete-light/pull/1015
This commit is contained in:
parent
6350a33043
commit
9c06220f9b
3 changed files with 13 additions and 6 deletions
|
@ -1,11 +1,6 @@
|
|||
$(document).on('turbolinks:load', function() {
|
||||
$('.select2').select2({
|
||||
tags: true,
|
||||
tokenSeparators: [','],
|
||||
allowClear: true,
|
||||
placeholder: '',
|
||||
theme: 'bootstrap',
|
||||
containerCssClass: ':all:',
|
||||
width: ''
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue