kongulov / nova-tab-translatable

This package contains a NovaTabTranslatable class you can use to make any Nova field type translatable with tabs.
MIT License
79 stars 17 forks source link

Repeter fields #40

Open DenisYakimchuk opened 8 months ago

DenisYakimchuk commented 8 months ago

Is there a way to make a Repeater field work with NovaTabTranslatable?

For now it has been properly displayed before saving the value (and the value looks to be stored fine) but when there's a value it can't render the field.

I'm getting a JS error: u.item.fields.map is not a function (webpack://laravel/nova/resources/js/components/Repeater/RepeaterRow.vue)

kongulov commented 8 months ago

@DenisYakimchuk Thank you very much for using the package.

Could you write what version of the packages you are using and post an example of use so that I can repeat the same problem myself and solve it

DenisYakimchuk commented 8 months ago

@kongulov thanks for your reply!

PHP: 8.2 Laravel Framework 10.44.0 Laravel Nova: v4.32.13 kongulov/nova-tab-translatable: 2.1.3

Here's a piece of code in a Resource fields:

Panel::make('Process', [
            NovaTabTranslatable::make([
               Repeater::make('Process')->repeatables([
                    Process::make('Item'),
                ]),
            ]),
]),

Repeater fields are:


Image::make('Image')->disk('public'),
Text::make('Title'),
Color::make('Point Color'),

And by the way it won't save the resource anymore with an error message "There was a problem submitting the form." if there's a value for a translated repeater field. So it could be saved just once.