Use new constantState()

This commit is contained in:
Dan Harrin
2024-03-25 22:38:48 +00:00
parent 5b9c49d3cd
commit 8afd052ea5
4 changed files with 4 additions and 4 deletions
@@ -541,7 +541,7 @@ class EntriesDemo extends Component implements HasInfolists
),
]),
])
->state([
->constantState([
'comments' => [
[
'author' => ['name' => 'Jane Doe'],
@@ -412,7 +412,7 @@ class LayoutDemo extends Component implements HasForms, HasInfolists
]),
]),
])
->state([
->constantState([
'items' => [
['product' => 'Filament t-shirt', 'quantity' => 3],
['product' => 'Filament hoodie', 'quantity' => 1],
@@ -97,7 +97,7 @@ use Filament\Infolists\Infolist;
public function productInfolist(Infolist $infolist): Infolist
{
return $infolist
->state([
->constantState([
'name' => 'MacBook Pro',
'category' => [
'name' => 'Laptops',
+1 -1
View File
@@ -21,7 +21,7 @@ class Actions extends Component implements HasForms, HasInfolists
public function infolist(Infolist $infolist): Infolist
{
return $infolist
->state([])
->constantState([])
->schema([
TextEntry::make('textEntry')
->registerActions([