Skip to content

Add button appears in first row of TabularInline #1694

@jcelaya

Description

@jcelaya

What version of Unfold are you using?
0.71.0

What version of Django are you using?
5.1.3

What browser are you using?
Firefox 141

Did you checked changelog/commit history, if the bug is not already fixed?
Yes

Did you searched other issues, if the bug is not already fixed?
Yes

Did you checked documentation?
Yes

Are you able to replicate the bug in the demo site?
No. There are several TabularInline in the demo site, but all of them have only one element and the site is read-only.

Repository with reproduced bug
It should be possible to do it with the demo site by adding another element to a TabularInline. Not just adding a template row, it must be filled with data and saved to the DB.

Describe your issue
The "Add another Foo" button in a TabularInline view does not appear at the bottom, but after the first line. The code in static/admin/inline.js clearly adds it at the end of the first tbody element, but each row has its own tbody. The attached patch proposes a solution that should be consistent with the rest of the file.

fix-tabular-inline-add-button.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions