diff options
author | benal01 <bja4245@rit.edu> | 2025-03-31 22:52:49 -0400 |
---|---|---|
committer | benal01 <bja4245@rit.edu> | 2025-03-31 22:52:49 -0400 |
commit | 4186983da13740ec0a4731770ac238922631be11 (patch) | |
tree | 2c3a13246596e01d4bc95166d25548311e5be25f /ufund-ui/src/app/components/need-edit/need-edit.component.ts | |
parent | 786a6db3f5a22f7bb2cc249731ef654b675c3c86 (diff) | |
download | JellySolutions-4186983da13740ec0a4731770ac238922631be11.tar.gz JellySolutions-4186983da13740ec0a4731770ac238922631be11.tar.bz2 JellySolutions-4186983da13740ec0a4731770ac238922631be11.zip |
auto refresh with emitter
Diffstat (limited to '')
-rw-r--r-- | ufund-ui/src/app/components/need-edit/need-edit.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ufund-ui/src/app/components/need-edit/need-edit.component.ts b/ufund-ui/src/app/components/need-edit/need-edit.component.ts index 02ffb71..2462534 100644 --- a/ufund-ui/src/app/components/need-edit/need-edit.component.ts +++ b/ufund-ui/src/app/components/need-edit/need-edit.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, Output } from '@angular/core'; +import { Component, Input, Output, EventEmitter } from '@angular/core'; import { Need, GoalType } from '../../models/Need'; import { CupboardService } from '../../services/cupboard.service'; import { catchError, of } from 'rxjs'; @@ -18,7 +18,7 @@ export class NeedEditComponent { ) {} @Input() selectedNeed!: Need; - @Output() selectedNeedID: number | null = null; + @Output() refreshNeedList = new EventEmitter<void>(); update(form: any) { console.log(form); @@ -50,7 +50,7 @@ export class NeedEditComponent { (result) => { if (result) { console.log("need updated successfully"); - // this.needList?.refresh() + this.refreshNeedList.emit(); } else { console.log("need update failed"); } |