jrief / django-admin-sortable2

Generic drag-and-drop ordering for objects in the Django admin interface
https://django-admin-sortable2.readthedocs.io/en/latest/
Other
776 stars 180 forks source link

Double new item row added by SortableInlineAdminMixin + TabularInline #284

Closed m-melis closed 3 years ago

m-melis commented 3 years ago

Just upgraded to django 3.2 and found the following. Using TabularInline with SortableInlineAdminMixin a double "new item" row is added. This does not happen in the case of the StackedInline.

django-admin-sortable2 version 1.0.1

SortableInlineAdminMixin, admin.TabularInline: image

admin.TabularInline: image

SortableInlineAdminMixin, admin.StackedInline: image

Thanks for your work.

jrief commented 3 years ago

If you downgrade to version 1.0, does it still happen? I just changed one CSS class, 🤔

m-melis commented 3 years ago

Works fine with version 1.0 and Django 3.2, yes!

image

amureki commented 3 years ago

Greetings fellows,

I can confirm that 1.0.1 (and #273 in particular) leads to the described issues (and broken inline behaviour in general).

CleanShot 2021-09-30 at 17 16 29

Our setup:

And when rolling back to django-admin-sortable2 1.0.0 all works as expected. I wonder if we can fix custom admin interfaces and CSS frameworks in some other ways, however I don't see a good solution yet. :(

Best, Rust

jrief commented 3 years ago

Without having a setup where I can test this, could you please do me a favor: Use the latest version from GitHub and try again. If that helps, I'll release version 1.0.2

m-melis commented 3 years ago

Working fine again after installing the latest github version. 👍🏼

jrief commented 3 years ago

Version 1.0.2 is available.