Laravel-Backpack / theme-tabler

UI for Backpack v6 that uses Tabler and Bootstrap v5.
MIT License
21 stars 12 forks source link

[Bug] Quick summary here #184

Closed LeMingon closed 1 month ago

LeMingon commented 1 month ago

Bug report

I have an issue with dropdown, my menu works without dropdown, and when I am adding dropdown classes in menu_items, I have this error: Unable to locate a class or view for component [theme-tabler::menu-dropdown].

What I did

I tried to add all classes correctly, but it is not working

What I expected to happen

I expected that menu authentication would be a dropdown menu(roles, permissions, and users)

What happened

I have error

What I've already tried to fix it

composer dump-autoload

Context to replicate the bug - Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

backpack/basset: 1.3.3
backpack/crud: v6.x-dev
backpack/generators: v4.0.5
backpack/permissionmanager: 7.2.1
backpack/pro: 2.1.13
backpack/theme-coreuiv2: 1.2.3
backpack/theme-tabler: 1.2.8
jalalnabiyev@MacBook-Air-Jalal mashinbazari % 
karandatwani92 commented 1 month ago

Hey @LeMingon

I saw your code on stackoverflow.

You are using:

<x-theme-tabler::menu-dropdown title="Authentication" icon="la la-group">
     <x-backpack::menu-dropdown-item title="Users" icon="la la-user" :link="backpack_url('user')" />
     <x-backpack::menu-dropdown-item title="Roles" icon="la la-group" :link="backpack_url('role')" />
     <x-backpack::menu-dropdown-item title="Permissions" icon="la la-key" :link="backpack_url('permission')" />
</x-theme-tabler::menu-dropdown>

But you should use(notice the difference: ~x-theme-tabler~):

<x-backpack::menu-dropdown title="Authentication" icon="la la-user" nested="true">
     <x-backpack::menu-dropdown-item title="Users" icon="la la-user" :link="backpack_url('user')" />
     <x-backpack::menu-dropdown-item title="Roles" icon="la la-group" :link="backpack_url('role')" />
     <x-backpack::menu-dropdown-item title="Permissions" icon="la la-key" :link="backpack_url('permission')" />
</x-backpack::menu-dropdown>

resources/views/vendor/backpack/ui/inc/menu_items.blade.php

For more info, check this section of docs.

karandatwani92 commented 1 month ago

Closing due to no response!

If you are still facing the issue, feel free to reopen with more details.