Browse Source
Merge pull request #14257 from abpframework/Issue-11147
Added output to extensible table for click event.
pull/14294/head
Mahmut Gundogdu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
2 deletions
-
npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-table/extensible-table.component.html
-
npm/ng-packs/packages/theme-shared/extensions/src/lib/components/extensible-table/extensible-table.component.ts
|
|
|
@ -1,4 +1,10 @@ |
|
|
|
<ngx-datatable default [rows]="data" [count]="recordsTotal" [list]="list"> |
|
|
|
<ngx-datatable |
|
|
|
default |
|
|
|
[rows]="data" |
|
|
|
[count]="recordsTotal" |
|
|
|
[list]="list" |
|
|
|
(activate)="tableActivate.emit($event)" |
|
|
|
> |
|
|
|
<ngx-datatable-column |
|
|
|
*ngIf="actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)" |
|
|
|
[name]="actionsText | abpLocalization" |
|
|
|
|
|
|
|
@ -11,6 +11,7 @@ import { formatDate } from '@angular/common'; |
|
|
|
import { |
|
|
|
ChangeDetectionStrategy, |
|
|
|
Component, |
|
|
|
EventEmitter, |
|
|
|
Inject, |
|
|
|
InjectFlags, |
|
|
|
InjectionToken, |
|
|
|
@ -18,6 +19,7 @@ import { |
|
|
|
Input, |
|
|
|
LOCALE_ID, |
|
|
|
OnChanges, |
|
|
|
Output, |
|
|
|
SimpleChanges, |
|
|
|
TemplateRef, |
|
|
|
TrackByFunction, |
|
|
|
@ -63,6 +65,8 @@ export class ExtensibleTableComponent<R = any> implements OnChanges { |
|
|
|
} |
|
|
|
@Input() actionsTemplate: TemplateRef<any>; |
|
|
|
|
|
|
|
@Output() tableActivate = new EventEmitter(); |
|
|
|
|
|
|
|
getInjected: <T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags) => T; |
|
|
|
|
|
|
|
hasAtLeastOnePermittedAction: boolean; |
|
|
|
@ -158,7 +162,6 @@ export class ExtensibleTableComponent<R = any> implements OnChanges { |
|
|
|
value, |
|
|
|
}; |
|
|
|
if (prop.value.component) { |
|
|
|
|
|
|
|
const injector = Injector.create({ |
|
|
|
providers: [ |
|
|
|
{ |
|
|
|
|