-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Manage UI endpoints in App Detail tab (#179)
* feat: add tab with table for mfe endpoints and make editable * feat: add new row functionality * feat: add delete functionality * feat: add test for delete --------- Co-authored-by: Christian Badura <[email protected]>
- Loading branch information
Showing
7 changed files
with
139 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { Directive, Input, HostListener } from '@angular/core' | ||
import { Table } from 'primeng/table' | ||
|
||
@Directive({ | ||
// eslint-disable-next-line @angular-eslint/directive-selector | ||
selector: '[pAddRow]' | ||
}) | ||
export class AddRowDirective { | ||
@Input() table!: Table | ||
@Input() newRow: any | ||
|
||
@HostListener('click', ['$event']) | ||
onClick(event: Event) { | ||
// Insert a new row | ||
this.table.value.push(this.newRow) | ||
|
||
// Set the new row in edit mode | ||
this.table.initRowEdit(this.newRow) | ||
|
||
event.preventDefault() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters