Accidental Character breaks Poseidon submenus

Post Reply
kmll
Posts: 5
Joined: 02 Sep 2017, 05:36

03 Sep 2017, 00:20

The export class AppSubMenu contains an accidental  character within itemClick causing errors.


export class AppSubMenu {

@Input() item: MenuItem;

@Input() root: boolean;

@Input() visible: boolean;

_reset: boolean;

activeIndex: number;

constructor(@Inject(forwardRef(() => AppComponent)) public app:AppComponent, public router: Router, public location: Location) {}

itemClick(event: Event, item: MenuItem, index: number) {
//avoid processing disabled items
if(item.disabled) {
event.preventDefault();
return true;
}

//activate current item and deactivate active sibling if any
this.activeIndex = (this.activeIndex === index) ? null : index;

//execute command
if(item.command) {
item.command({originalEvent: event, item: item});
}

//prevent hash change
if(item.items || (!item.url && !item.routerLink)) {
event.preventDefault();
}

//hide menu
if(!item.items) {
if(this.app.isHorizontal())
this.app.resetMenu = true;
else
this.app.resetMenu = false;

this.app.overlayMenuActive = false;
this.app.staticMenuMobileActive = false;
}
}

isActive(index: number): boolean {
return this.activeIndex === index;
}

@Input() get reset(): boolean {
return this._reset;
}

set reset(val:boolean) {
this._reset = val;

if(this._reset && this.app.isHorizontal()) {
this.activeIndex = null;
}
}
}
Last edited by kmll on 12 Sep 2017, 17:33, edited 1 time in total.

kmll
Posts: 5
Joined: 02 Sep 2017, 05:36

03 Sep 2017, 17:31

This did not fix the submenus.
There must be something wrong with my installation. Out of the box, Poseidon works fine except for submenus on the left of the dashboard.
Each of the menu options has an arrow button that rotates fine. However, the menu does not expand or populate. I have removed the extra character referenced above and this removed the proliferation of errors. No other modifications made to Poseidon.
Your web site version works fine on my computer.
I am using
Windows 10;
Node.js version 8.4.0
NPM 5.4.0

Thank you.

Post Reply

Return to “Poseidon - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest