This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inject NavigationManager _navigated | |
@foreach (var category in categories.Where(subcatg => subcatg.CategoryParentId == ParentId)) | |
{ | |
bool isCollapse = true; | |
string node = category.CategoryName; | |
bool hasSubcategory = categories.Where(subcatg => subcatg.CategoryParentId == category.CategoryId).Any() | |
bool canExpand = isCollapse == @isCollapseNavMenu && node == @nodeParent && hasSubcategory | |
<li class="nav-item px-2"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const treeview = $('#treeviewCategories') | |
const categories = JSON.parse(serializeCategories.replace(/"/g, `"`)) | |
const separatorCategory = "-" | |
const urlProducts = "http://localhost:3000/Shop/Products/" | |
const initTag = '<ul class="nested">' | |
const closeTag = '</ul>' | |
function expandSubcategories() { | |
const subCategories = _getSubcategories() |