SAP / fundamental-ngx

Fundamental Library for Angular is SAP Design System Angular component library
https://sap.github.io/fundamental-ngx
Apache License 2.0
264 stars 126 forks source link

[WIP][P1][Dev blocker][Sourcing] fdp-column does not capture [label] changes #10705

Closed oscargong closed 11 months ago

oscargong commented 11 months ago

Is this a bug, enhancement, or feature request?

bug / feature request

Describe your proposal.

current TableColumnComponent cannot detect [label] changes:

libs/platform/src/lib/table/components/table-column/table-column.component.ts :

/** Table won't know about column properties update so notify about it manually
 * @hidden */
ngOnChanges(changes: SimpleChanges): void {
    if (this._tableService && (changes.sortable || changes.filterable || changes.groupable || changes.freezable)) {
        this._tableService.markForCheck();
    }
}

Can you handle that on the application side

Our application need to display dynamic information on the column label and those information cannot be calculated onngAfterContentlnit.

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

0.46.0-rC.85

If this is a bug, please provide steps for reproducing it; the exact components you are using;

https://stackblitz.com/edit/angular-21wkwn?file=src%2Fapp%2Fplatform-table-default-example.component.html

https://github.com/SAP/fundamental-ngx/assets/7035787/059ada13-ce3c-4945-a96a-c5f6749617d3

Please provide relevant source code (if applicable).

https://stackblitz.com/edit/angular-21wkwn?file=src%2Fapp%2Fplatform-table-default-example.component.html

Please provide stackblitz example(s).

https://stackblitz.com/edit/angular-21wkwn?file=src%2Fapp%2Fplatform-table-default-example.component.html

Did you check the documentation and the API?

yes

Did you search for similar issues?

yes

Is there anything else we should know?

I543348 commented 11 months ago

P2 and a dev blocker as its blocking feature

droshev commented 11 months ago

@oscargong do you need this for 0.46 or 0.43?

N1XUS commented 11 months ago

Hello @oscargong Have you tried using this directive? https://stackblitz.com/run?file=src%2Fapp%2Fplatform-table-custom-column-example.component.html%3AL5

oscargong commented 11 months ago

Hi @droshev either is fine Hi @N1XUS would you mind reposting the stackblitz link? I cannot open the link you posted.

N1XUS commented 11 months ago

Hi @droshev either is fine Hi @N1XUS would you mind reposting the stackblitz link? I cannot open the link you posted.

Sorry for that :) https://stackblitz.com/edit/nqbt9n?file=src%2Fapp%2Fplatform-table-custom-column-example.component.html%3AL5-L5

oscargong commented 11 months ago

Hi @N1XUS Thanks for bring this up, I didn't know such directive before. It works for my use case.