We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 995d31f commit 1633ae5Copy full SHA for 1633ae5
src/PositionObserver.php
@@ -45,6 +45,11 @@ public function saving($model)
45
if ($model->isPositionUpdateDisabled() === false) {
46
// Get the position for current and old value
47
$position = $model->getPosition();
48
+
49
+ // Prevent modifying position column when updating and position columns has not changed
50
+ if ($model->exists === true && $model->isDirty($model->getPositionColumn()) === false) {
51
+ return;
52
+ }
53
54
// Get the old position
55
$oldPosition = $model->getOriginal($model->getPositionColumn());
0 commit comments