nova-json icon indicating copy to clipboard operation
nova-json copied to clipboard

Default attribute ignored on fields

Open WillyReyno opened this issue 10 months ago • 1 comments

Hello and thanks for this package!

I noticed that default attribute allowing to set a default value to a field are ignored when used inside JsonRepeatable:

JsonRepeatable::make('Providers', 'providers')
                        ->fullWidth()
                        ->hideFromIndex()
                        ->hideWhenCreating()
                        ->fields([
                            Text::make('Name', 'name')
                                ->default('My default value')
                                ->rules(['required']),
                        ]),

I would expect my Name field to be filled with "My default value" but remains empty.

WillyReyno avatar Mar 09 '25 17:03 WillyReyno

Hi, @WillyReyno Sorry, I don't have time to update package in near future If you make PR, i'll merge it Have a good day

stepanenko3 avatar Mar 10 '25 17:03 stepanenko3