TranslatableContainer in Repeater

I have an issue I cant seem to resolve. So I want to create an repeater for recipes steps and each step should be translated. Here for I use "mvenghaus/filament-plugin-translatable-inline": "3.0". But I get this error Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization With this code below. When I remove the TranslatableContainer then it works. Hope somebody can help me
Section::make('Receptstappen')
->schema([
Repeater::make('recipes_steps')
->label('')
->relationship('steps')
->schema([
TranslatableContainer::make(
TextInput::make('description')
->label('Beschrijving')
->required(),
),
]),
])
Section::make('Receptstappen')
->schema([
Repeater::make('recipes_steps')
->label('')
->relationship('steps')
->schema([
TranslatableContainer::make(
TextInput::make('description')
->label('Beschrijving')
->required(),
),
]),
])
Solution:
Fixed it. Composer did not installed the lates updated version for the package mvenghaus/filament-plugin-translatable-inline": "3.0" when I used composer require mvenghaus/filament-plugin-translatable-inline:"^3.0" it just installed version 3.0
Jump to solution
2 Replies
GizaRex
GizaRex3mo ago
So i tried to debug it like this
Repeater::make('recipes_steps')
->label('')
->relationship('steps')
->schema([
TranslatableContainer::make(
TextInput::make('description')
->afterStateHydrated(fn (string $state) => dd($state))
),
]),
Repeater::make('recipes_steps')
->label('')
->relationship('steps')
->schema([
TranslatableContainer::make(
TextInput::make('description')
->afterStateHydrated(fn (string $state) => dd($state))
),
]),
So i used dd() and I get the right value that I was expecting. But still I get this error => Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Solution
GizaRex
GizaRex3mo ago
Fixed it. Composer did not installed the lates updated version for the package mvenghaus/filament-plugin-translatable-inline": "3.0" when I used composer require mvenghaus/filament-plugin-translatable-inline:"^3.0" it just installed version 3.0