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

Saving data object when sort order is 0 pushes it to the end. #157

Open
MattyBalaam opened this issue Jul 26, 2016 · 1 comment
Open

Saving data object when sort order is 0 pushes it to the end. #157

MattyBalaam opened this issue Jul 26, 2016 · 1 comment

Comments

@MattyBalaam
Copy link

MattyBalaam commented Jul 26, 2016

With the default example for onBeforeWrite, testing for !$this->Sort will return true if the current sort number is 0.

So, if you are saving in the detail form, it will then move this item to the last.

My solution for this was to change to checking for an integer:

!is_int($this->Sort)
@tractorcow
Copy link

tractorcow commented Aug 17, 2016

Regression in 1.4

More information on this at #159

The above workaround will not work if saving and reloading a "new" record from the database, since the DB might assign 0 as default value.

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

4 participants