conditional entry name on the make method

I can't find any reference how to do conditional inside the make method like the TextEntry here
RepeatableEntry::make('mydata.user_data')
->schema([
TextEntry::make(fn ($data) => $data['is_what'] ? 'id' : 'name'),
])
->columns()
RepeatableEntry::make('mydata.user_data')
->schema([
TextEntry::make(fn ($data) => $data['is_what'] ? 'id' : 'name'),
])
->columns()
1 Reply
awcodes
awcodes9mo ago
make() doesn't except closures. you'll need to include them both then conditionally show or hide them
Want results from more Discord servers?
Add your server