Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Apr 23, 2024
1 parent 5ae6451 commit 2757c4e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions resources/views/navigation/group.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
->whereDoesntStartWith('wire:model')
}}>
@foreach ($navigation->items() as $item)
{{ $item->state() }}

<x-wireuse::actions-link
:action="$item"
wire:click="$set('{{ $wireModel }}', '{{ $item->getName() }}')"
Expand Down
2 changes: 1 addition & 1 deletion src/Navigation/Concerns/WithNavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ trait WithNavigation
public function mountWithNavigation(): void
{
$this->navigation->fill([
'schema' => $this->navigation(),
'items' => $this->navigation(),
]);
}

Expand Down
4 changes: 1 addition & 3 deletions src/Navigation/Contracts/HasNavigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Foxws\WireUse\Navigation\Contracts;

use Foxws\WireUse\Navigation\Support\Navigation;

interface HasNavigation
{
// public function navigation(): array;
public function navigation(): array;
}
7 changes: 6 additions & 1 deletion src/Navigation/Support/Navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@

class Navigation extends State
{
public $schema = [];
public array $items = [];

public function items(): array
{
return $this->items;
}
}

0 comments on commit 2757c4e

Please sign in to comment.