added ability to remove column
This commit is contained in:
parent
4daa0e83b0
commit
ed0d7c57c8
|
@ -1,4 +1,7 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
import { Store } from '@ngxs/store';
|
||||
|
||||
import { StreamElement, RemoveStream } from '../../../states/streams.state';
|
||||
|
||||
@Component({
|
||||
selector: 'app-stream-edition',
|
||||
|
@ -6,8 +9,9 @@ import { Component, OnInit } from '@angular/core';
|
|||
styleUrls: ['./stream-edition.component.scss']
|
||||
})
|
||||
export class StreamEditionComponent implements OnInit {
|
||||
@Input() streamElement: StreamElement;
|
||||
|
||||
constructor() { }
|
||||
constructor(private readonly store: Store) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
@ -24,6 +28,7 @@ export class StreamEditionComponent implements OnInit {
|
|||
|
||||
delete(): boolean {
|
||||
console.log('delete');
|
||||
this.store.dispatch([new RemoveStream(this.streamElement.id)]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<app-stream-edition class="stream-edition" *ngIf="editionPanelIsOpen"></app-stream-edition>
|
||||
<app-stream-edition class="stream-edition" *ngIf="editionPanelIsOpen"
|
||||
[streamElement]="streamElement"></app-stream-edition>
|
||||
|
||||
<app-stream-statuses class="stream-statuses" [streamElement]="streamElement" [goToTop]="goToTopSubject.asObservable()"
|
||||
(browseAccountEvent)="browseAccount($event)" (browseHashtagEvent)="browseHashtag($event)" (browseThreadEvent)="browseThread($event)"></app-stream-statuses>
|
||||
|
|
Loading…
Reference in New Issue