outl1ne / nova-simple-repeatable

A Laravel Nova simple repeatable rows field.
MIT License
73 stars 42 forks source link

Store SimpleRepeatable as JSON attribute not working. #33

Closed chirag-nandaniya closed 1 year ago

chirag-nandaniya commented 2 years ago

I am using SimpleRepeatable under Flexible Content Layout(https://github.com/whitecube/nova-flexible-content). Its generates the fields but not able to save it successfully. I think issue is SimpleRepeatable not able to store under JSON attribute.

Flexible::make('Sub Regions', 'sub_regions') ->addLayout('Sub Region', 'sub_region', [ Text::make('Title'), SimpleRepeatable::make('Charges', 'charges', [ Text::make('Weight From', 'weight_from') ->required(true), Text::make('Weight To', 'weight_to') ->required(true), ]) ->fullWidth() ->button('Add Sub Region'), ]),

Able to create one JSON attribute and save SimpleRepeatable JSON under it? Here "Charges" attribute not generated.

KasparRosin commented 1 year ago

Make sure you are running the latest version. Unable to re-produce.