mirror of
https://github.com/filamentphp/filament.git
synced 2026-10-24 12:04:06 +08:00
Use new constantState()
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user