-
Notifications
You must be signed in to change notification settings - Fork 2
Description
ps-list-actions ps-row-options rework into ps-table-action:
keiner: is klar
"3-boppel": wenn mehr als X aktionen verfügbar (konfigurierbar evtl default 2) oder aktion hat kein kein icon
x-icons: keine "3-boppel" icon muss gesetzt sein; Label als tooltip
actions = [
{
label: '',
icon: '',
context: list|row|all,
isDisabledFnc: () => {},
isVisibleFnc: () => {},
actionFnc: () => {},
template: @ViewChild | ComponentRef,
styleClasses: '',
children: [
{
label: '',
icon: '',
context: list|row|all,
isDisabledFnc: () => {},
isVisibleFnc: () => {},
actionFnc: () => {}
},
]
},
{
label: '',
icon: '',
context: list|row|all,
isDisabledFnc: () => {},
isVisibleFnc: () => {},
actionFnc: () => {}
},
{
label: '',
icon: '',
context: list|row|all,
isDisabledFnc: () => {},
isVisibleFnc: () => {},
actionFnc: () => {}
},
]
tds = new TableDataSource({
...,
actions: actions
})
<ps-table [actions]="actions">
IPsTableActionDataSource {
label: '',
icon: '',
context: list|row|all,
rowIsDisabledFnc: () => {},
rowIsVisibleFnc: () => {},
listIsDisabledFnc: () => {},
listIsVisibleFnc: () => {},
actionFnc: () => {}
}
default-action: <ps-table-action [isDisabledFnc] [isVisibleFnc] [label]="blubb" [icon]="mat_check" [context]="list|row|all" (action)="doIt($event.data)">
</ps-table-action>
</ps-table-action>
custom-action: <ps-table-action [label]="blubb" [icon]="mat_check" [context]="list|row|all">
<ng-container *psTableCustomAction="let row">
<mat-checkbox (change)="doIt(row)" [matMenuTriggerFor]="">
<ng-container *psTableCustomAction="let row">
<mat-checkbox (change)="doIt(row)" [matMenuTriggerFor]="">
</ps-table-action>
</ps-table-action>
</ps-table-action>
reused custom-action: <ps-table-action [label]="blubb" [icon]="mat_check" [context]="list|row|all">
<ng-container [ngTemplateOutlet]="blubb" [ngTemplateOutletContext]="{ $implicit: row }" *psTableCustomAction="let row">
<ng-template #blubb let-row>
<mat-checkbox (change)="doIt(row)"></mat-checkbox>
</ng-template>
label, icon: required
context: default(all)
ladekringel
action-error action-pending unten im Footer mit popup und dismiss-button (abschaltbar)
action bei navigation weiterführen oder cancelen?
ps-table sortable umbauen auf true, false, header und dropdown/select
ps-table list/row more options immer noch angezeigt auch wenn keine action verfügbar
ps-table detailview checron ausblenden, wenn kein detailview pro row
Header-button fehlt das margin, wenn sonst keine header elemente (align-self: flex-end?)
ps-table performance optimieren