applegrew / django-select2

This is a Django integration for Select2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean option no works properly

OVarLaz opened this issue · comments

Describe the bug
Visual bug in django-select2 option, when I try to clean the content in the box, removing all items, but if I select a new, I get a blank space. I use django-select2==7.2.0 (lastest version)

Exception & Traceback
If I click 2 times in the "x", the content is cleaned completely

Code Snippet
forms.py
image

views.py

especialidadesFormset = CentroInvestigacionEspecialidadForm(prefix='especialidades')

reg.html

<div class="col-12">
       {{ especialidadesFormset.management_form }}
        {% for form in especialidadesFormset %}
              {{ especialidadesFormset }}
        {% endfor %}
  </div>

To Reproduce
Steps to reproduce the behavior:

  1. Go to the view with the select2 field
  2. Add/select one or more options
  3. Remove all items, clicking in "x"
  4. Select another item of the list
  5. Will see a blank selection before the last selected

Expected behavior
It must not show that blank space, with my selection

Screenshots
x

Hi @OVarLaz the CentralInvestigationEspecialidad model with me as well? Best Joe

This repo has moved, please address your issue at https://github.com/codingjoe/django-select2 Thanks!