Please add event validateStructure in Backend\Widgets\ListStructure
public function onReorder()
{
$item = $this->model->newQueryWithoutScopes()->find(post('record_id'));
$this->fireSystemEvent('backend.list.validateStructure', [$item]); // <- this method
if ($this->model->isClassInstanceOf(\October\Contracts\Database\NestedSetInterface::class)) {
$this->reorderForNestedTree($item);
} else {
if ($this->model->hasRelation('parent')) {
$this->reorderForSimpleTree($item);
}
if ($this->model->isClassInstanceOf(\October\Contracts\Database\SortableInterface::class)) {
$this->reorderForSortable($item);
}
}
$this->fireSystemEvent('backend.list.reorderStructure', [$item]);
return $this->onRefresh();
}
The method is needed to check whether the record can be moved to the right place or not. Or for example, there is such a possibility or not. Now the record is simply transferred without the possibility of verification, and in some cases this can be critical