laravel / nova-issues

556 stars 34 forks source link

Repeater items are not moved during the creation of a new resource #5837

Closed fenestron closed 1 year ago

fenestron commented 1 year ago

Description:

Repeater items are not moved during the creation of a new resource. However, they are moved during the update of the same resource.

25.08.2023 14:22:51.webm

Detailed steps to reproduce the issue on a fresh Nova installation:

Model's fields:

public function fields(NovaRequest $request)
{
    return [
        ID::make()->sortable(),

        Repeater::make('Line Items', 'data')
            ->repeatables([
                LineItem::make(),
            ]),
    ];
}

LineItem.php

<?php

namespace App\Nova\Repeater;

use Laravel\Nova\Fields\Number;
use Laravel\Nova\Fields\Repeater\Repeatable;
use Laravel\Nova\Http\Requests\NovaRequest;

class LineItem extends Repeatable
{
    public function fields(NovaRequest $request)
    {
        return [
            Number::make('Quantity')->rules('required', 'numeric'),
        ];
    }
}
crynobone commented 1 year ago

Thank you for the report, we already noticed this and a fixed has been added pending next release.

crynobone commented 1 year ago

solved together with #5786

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.