return item
This commit is contained in:
parent
34e82ce85e
commit
ac01076973
@ -41,11 +41,11 @@ export class ToolbarComponent implements OnInit, AfterViewInit {
|
|||||||
this.menuItemsChange.emit(this.displayMenuItems);
|
this.menuItemsChange.emit(this.displayMenuItems);
|
||||||
|
|
||||||
if(item.enabled) {
|
if(item.enabled) {
|
||||||
if(item.onEnabled) item.onEnabled();
|
if(item.onEnabled) item.onEnabled(item);
|
||||||
} else {
|
} else {
|
||||||
if(item.onDisabled) item.onDisabled();
|
if(item.onDisabled) item.onDisabled(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(item.click) item.click();
|
if(item.click) item.click(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,9 +5,9 @@ export interface ToolbarItem {
|
|||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
toggle?: boolean;
|
toggle?: boolean;
|
||||||
individualToggle?: boolean;
|
individualToggle?: boolean;
|
||||||
click?: () => void;
|
click?: (item?: ToolbarItem) => void;
|
||||||
enabled?: boolean;
|
enabled?: boolean;
|
||||||
onEnabled?: () => void;
|
onEnabled?: (item?: ToolbarItem) => void;
|
||||||
onDisabled?: () => void;
|
onDisabled?: (item?: ToolbarItem) => void;
|
||||||
subMenu?: ToolbarItem[];
|
subMenu?: ToolbarItem[];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user