Builder: block open by default?

Hello, I'm using a simple Builder in my filament admin app. My builder contains 2 blocks : Paragraph or Image, each having multiple inputs. I would like, on creation, to have a block image already opened. Is is possible? I don't find how in the doc Thx 🙂
Solution:
Try ```php ->default([ [ ‘type’ => ‘image’, ‘content’ => []], ])...
Jump to solution
3 Replies
Solution
awcodes
awcodes3mo ago
Try
->default([
[ ‘type’ => ‘image’, ‘content’ => []],
])
->default([
[ ‘type’ => ‘image’, ‘content’ => []],
])
Content might be ‘data’ though. Trying to go from memory. And this will only work in the create context.
awcodes
awcodes3mo ago
Might need to specify the content keys too. Not sure.
Jérôme
Jérôme3mo ago
it's perfect thx a lot. It works with both but the right one is data (or else it works but is not right in database): ->default([ [ 'type' => 'image', 'data' => []], ]),
Want results from more Discord servers?
Add your server