mirror of
https://github.com/brufdev/many-notes.git
synced 2026-04-26 03:38:36 -05:00
Lazy-load the tree view component
This commit is contained in:
@@ -17,6 +17,17 @@ class TreeView extends Component
|
||||
|
||||
public $showEditModal = false;
|
||||
|
||||
public function placeholder(): string
|
||||
{
|
||||
return <<<'HTML'
|
||||
<div class="fixed inset-0 z-40 opacity-50 bg-light-base-200 dark:bg-base-950">
|
||||
<div class="flex items-center justify-center h-full">
|
||||
<x-icons.spinner class="w-5 h-5 animate-spin" />
|
||||
</div>
|
||||
</div>
|
||||
HTML;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
$constraint = function ($query) {
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<livewire:vault.tree-view :$vault />
|
||||
<livewire:vault.tree-view lazy="on-load" :$vault />
|
||||
</div>
|
||||
|
||||
<div class="absolute top-0 bottom-0 right-0 flex flex-col w-full overflow-y-auto transition-all text-start md:pl-60"
|
||||
|
||||
Reference in New Issue
Block a user