saade / filament-adjacency-list

A Filament package to manage adjacency lists (aka trees).
https://filamentphp.com/plugins/saade-adjacency-list
MIT License
76 stars 13 forks source link

Start position at 1 like filament reorderable #33

Closed GhostvOne closed 2 months ago

GhostvOne commented 3 months ago

Filament reorderable start position at 1 and it should be like Filament.

You can take a look here in Filament : filament\tables\src\Concerns\CanReorderRecords.php

foreach ($order as $index => $recordKey) {
    $this->getTableRecord($recordKey)->{$relationship->getPivotAccessor()}->update([
        $orderColumn => $index + 1,
    ]);
}
GhostvOne commented 3 months ago

@saade