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

Translatable fields cannot be inside a Panel if TranslatableTabToRawTrait is used. #9

Closed miagg closed 3 years ago

miagg commented 3 years ago

Hi, It seems that Panels do not work well with this package.

See the image bellow. If I use TranslatableTabToRowTrait, the fields pop-out of the panel.

Panel::make('Photo Details', [
    ID::make()->sortable()->hide(),

    // ... some fields

   NovaTabTranslatable::make([
        Textarea::make('Description')
            ->placeholder('Optional Description')
            ->rows(2)
            ->sortable()
    ]),
])->withToolbar(),

Is there a quick fix for this? Screenshot 2021-06-12 at 12 47 37 PM

kongulov commented 3 years ago

@miagg Can you tell "Panel" which package is it?

miagg commented 3 years ago

@miagg Can you tell "Panel" which package is it?

I'm talking about native field Panels.

To solve this I use ->onlyOnForms() for the NovaTabTranslatable field and then I use a regular Text field with ->exceptOnForms() for the items I want in the panel.

kongulov commented 3 years ago

@miagg Done. Take the new version and check please. 1.0.13 : https://github.com/kongulov/nova-tab-translatable/commit/0ef0bfc6a18bbda9801713afe0c89562198f89db

miagg commented 3 years ago

@miagg Done. Take the new version and check please. 1.0.13 : 0ef0bfc

Yes! It's working perfectly now. Thanks for the quick fix!