#34789: `filter_horizontal` duplicates entries in "Chosen" column after
instance is
added via in another field using the "plus" JS action
-------------------------------+------------------------------------
Reporter: devin13cox | Owner: (none)
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------+------------------------------------
Comment (by David Sanders):
Replying to [ticket:34789 devin13cox]:
> My initial guess is that updating the query to not include the "Chosen"
column in filter_horizontal fields would solve this issue (something like
> {{{
> const selectsRelated = document.querySelectorAll(`[data-model-
ref="${modelName}"] div:not(.selector-chosen) > select:not(.admin-
autocomplete)`);
> }}}
That could work 👍 I'm just wondering though whether there's a better
approach than to continuously blacklist ancestors as we come across these
🤔
--
Ticket URL: <https://code.djangoproject.com/ticket/34789#comment:8>
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 on the web visit
https://groups.google.com/d/msgid/django-updates/0107018a2663fea0-652270de-1360-4a78-84c5-58bc138968dd-000000%40eu-central-1.amazonses.com.