Skip to content

Options given at select2_options are not used #15

@stephane

Description

@stephane

As exposed in MixedForm test in django-select2 source code, options given to select2_options are not used because width is not an option known of django-select2 and because select2 expects placeholder not placeHolder.

class FooSelect2Field(django_select2.AutoModelSelect2Field):
    queryset = Foo.objects
    search_fields = ['name__icontains, ]

    station = StationSelect2Field(widget=django_select2.AutoHeavySelect2Widget(select2_options={
        'width': '32em',
        'placeholder': _(u"Search foo")
    })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions