#35911: FilteredSelectMultiple Widget Not Functional in Inline Formset After 
Form
Deletion
-------------------------------------+-------------------------------------
     Reporter:  ulr0                 |                     Type:  Bug
       Status:  new                  |                Component:
                                     |  contrib.admin
      Version:  4.2                  |                 Severity:  Normal
     Keywords:  inlines,             |             Triage Stage:
  SelectFilter2,                     |  Unreviewed
  FilteredSelectMultiple             |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------
 In the Django admin interface, when using an inline formset that includes
 a FilteredSelectMultiple widget,
 deleting a form causes the FilteredSelectMultiple widget below the deleted
 form to become non-functional.

 It appears that this issue may stem from how the id attribute index is
 dynamically updated when forms are added or deleted.
 The SelectFilter event listener seems to register the initial id at the
 time of SelectFilter creation.
 When the id changes, the event listener does not update, which causes the
 filter functionality to break.


 **Steps to Reproduce:**

 1. Open an inline formset in the Django admin that contains a
 FilteredSelectMultiple widget.
 2. Delete one of the forms within the inline formset.
 3. Observe that the FilteredSelectMultiple widget below the deleted form
 no longer functions correctly, with the filtering feature disabled.

 **Video Demonstration**: A video demonstrating this issue can be found
 here.
 
(https://drive.google.com/file/d/17zkF5I7Cf5NMW2_qU1vroPm8ef6ukyDl/view?usp=sharing)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35911>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070193298bac24-05217032-f19a-408d-b398-c78391e34889-000000%40eu-central-1.amazonses.com.

Reply via email to