perbaikan master

This commit is contained in:
2024-07-02 22:45:07 +07:00
parent b2d8a8e2f6
commit b095f870dd
17 changed files with 166 additions and 57 deletions

View File

@@ -12,17 +12,20 @@ interface Icon {
export class SelectIconComponent {
// @Output() iconSelected: EventEmitter<string> = new EventEmitter<string>();
@Output() iconSelected = new EventEmitter<string>();
@Input() selectedIcon: string;
@Input() selectedIcon = undefined;
icons: any[] = [];
constructor(private masterService: MasterService) {}
ngOnInit(): void {
this.masterService.getIconData().subscribe((res) => {
this.icons = res.rows;
});
if (!this.selectedIcon) {
this.selectedIcon = undefined;
}
}
onSelect(icon: Icon): void {
console.log(icon);
if (icon) {
this.iconSelected.emit(icon.icon);
} else {