laravel / nova-issues

556 stars 34 forks source link

Repeatable fields not working in Action fields #5758

Closed mateusgalasso closed 1 year ago

mateusgalasso commented 1 year ago

Description:

Repeatable fields not working in Action fields

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

Error on browser console

image
class OrcamentoUtilizacaoItem extends Repeatable
{
    /**
     * Get the fields displayed by the repeatable.
     *
     * @param  NovaRequest  $request
     * @return array
     */
    public function fields(NovaRequest $request)
    {
        return [
            Text::make('Descrição', 'descricao'),
        ];
    }
}

Action Class:

public function fields($request)
    {
        return [
            Repeater::make('Line Items')
                ->repeatables([
                    \App\Nova\Repeater\OrcamentoUtilizacaoItem::make(),
                ]),
        ];
    }
crynobone commented 1 year ago

Duplicate of #5718