Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ps-table: optimazations and enhancements #157

Open
KuhnMichael opened this issue Jan 27, 2021 · 1 comment
Open

ps-table: optimazations and enhancements #157

KuhnMichael opened this issue Jan 27, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@KuhnMichael
Copy link
Contributor

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

@Yirica Yirica added the enhancement New feature or request label Jun 10, 2021
@Yirica
Copy link
Contributor

Yirica commented Jun 10, 2021

Should be split into multiple issues as part of this is already done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants