fix error for reordering featured menu items

This commit is contained in:
Alex Martzios 2022-07-20 12:14:38 +03:00
parent a79e9f6cc9
commit 97250479ed
2 changed files with 4 additions and 2 deletions

View File

@ -66,7 +66,7 @@
{{item.type == 'external' ? item.url : item.route}}
</div>
<div *ngIf="item.type == 'internal' && item.route && pageStatus != null && !pageStatus.get(item.route)" class="uk-text-small uk-text-warning uk-margin-small-top">
This menu item is not visible because the page is disabled
This menu item will not visible because the page is disabled
</div>
</div>
<div class="uk-flex uk-flex-middle uk-flex-center">

View File

@ -374,7 +374,9 @@ export class MenuComponent implements OnInit {
public moveElement(index: number, newIndex: number, children: MenuItemExtended[] = []) {
this.elements.init();
this.subElements.init();
if(children && children.length) {
this.subElements.init();
}
if(this.selectedMenuType == 'customMenu') {
let temp = HelperFunctions.copy(this.featuredMenuItems);
HelperFunctions.swap(temp, index, newIndex);