Closed oscargong closed 1 year ago
can't you define a parent element and set the height on it instead?
Hi @droshev ,
Sure, I can define an outer wrapper div and set its style. But I will lose fdp-table's sticky header.
This feature request is nice-to-have, I still can adjust the inner table style with ::ng-deep
This is creating an issue for infinite scroll and expected to be fixed from NGX , workaround doesnt work properly
One note for this issue is virtualScroll
. if we don't define bodyHeight
,virtualScroll
will not be working. With bodyHeight
like this, it will create a whitespace if there is not many items.
/**
* Calculates rows in viewport.
*/
calculateVirtualScrollRows(): void {
if (!this.virtualScroll || !this.bodyHeight) {
return;
}
....
Some scenarios here should be considered:
We have found workarounds for both the original scenario and the virtual scrolling scenario.
Close this issue.
Is this a bug, enhancement, or feature request?
feature request
Briefly describe your proposal.
Right now,
<fdp-table>
supports thebodyHeight
input, and it will be used asThis is not enough if we want to make more adjustments to the table style without using
::ng-deep
.For example, we want to set the table style to
This way, the table height will adjust to the content height when there are not many rows, and it will not take up too much page space when there are a lot of rows.
If
<fdp-table>
could support a new@Input
, such astableStyle
, it would be helpful.fdp-table: https://github.com/SAP/fundamental-ngx/blob/main/libs/platform/src/lib/table/table.component.ts
Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)
0.38
If this is a bug, please provide steps for reproducing it.
N/A
Please provide relevant source code if applicable.
fdp-table: https://github.com/SAP/fundamental-ngx/blob/main/libs/platform/src/lib/table/table.component.ts
Is there anything else we should know?