Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GridFieldAddNewInlineButton position of new created record #331

Open
seppzzz opened this issue Feb 11, 2022 · 0 comments
Open

GridFieldAddNewInlineButton position of new created record #331

seppzzz opened this issue Feb 11, 2022 · 0 comments

Comments

@seppzzz
Copy link

seppzzz commented Feb 11, 2022

When adding a new record with GridFieldAddNewInlineButton
the new record (not saved record) will be added at the end of all existing rows of records.

So if you have e.g 15 records the new one is appended as the 16th line (row) on the bottom.

Wouldn't it be more clear for the user to prepend the new record on first place (top) of rows ?
instead of append it to the end ?

(As soon as you save this record, of course it'll be ordered depending on your settings)

I think this could be changed in GridFieldExtensions.js at line ≈ 195

this.find("tbody:first").prepend(tmpl(this[0].id + "ss-gridfield-add-inline-template", { num: num }));
//this.find("tbody:first").append(tmpl(this[0].id + "ss-gridfield-add-inline-template", { num: num }));

sepp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants