atayahmet / laravel-nestable

Laravel 5 nested category/menu generator
MIT License
214 stars 52 forks source link

ulAttr(['class' => 'sitemap']) - does not work #43

Closed DmitrySkibitsky closed 6 years ago

DmitrySkibitsky commented 6 years ago

Previously worked. Now there is no specified class in the generated layout.

php "atayahmet/laravel-nestable": "^0.8.0"

$result = \Nestable::make($prepare_data);
$result->ulAttr(['class' => 'sitemap'])->route(['categories/update' => 'id'])->renderAsHtml();
dump
"""
\n
<ul>\n
\n
<li ><a href="http://laravelshoppingcart.com/admin/categories/update/3">Категория 1 Ру</a><ul class="sitemap">\n
\n
<li ><a href="http://laravelshoppingcart.com/admin/categories/update/6">Под категория 2 Ру</a></li>\n
\n
</ul></li>\n
\n
<li ><a href="http://laravelshoppingcart.com/admin/categories/update/4">Категория 2 Ру</a><ul class="sitemap">\n
\n
<li ><a href="http://laravelshoppingcart.com/admin/categories/update/5">Под категория 1 Ру</a></li>\n
\n
</ul></li>\n
</ul>\n
"""
atayahmet commented 6 years ago

Class seems attached to inner <ul> element. am i wrong? Also the package last version 8.6

DmitrySkibitsky commented 6 years ago

It used to be so deepinscreenshot_select-area_20180104131906

now it does not assign a class to the parent ul deepinscreenshot_select-area_20180104131944

composer.json

        "php": ">=7.1.0",
        "atayahmet/laravel-nestable": "^0.8.6",

I regularly check for updates

DmitrySkibitsky commented 6 years ago

ulAttr(['class' => 'sitemap']) - This method used to work differently. And I think now it does not work properly deepinscreenshot_select-area_20180104132613