havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
463 stars 63 forks source link

[HxGrid] Placeholders do not use `ItemCssClass[Selector]` #802

Closed hakenr closed 1 week ago

hakenr commented 2 months ago

Eg. InvoiceList in Goran: image

Harvey1214 commented 3 weeks ago

@hakenr I don't think it is possible to solve the issue this way. We don't have the item (TItem), therefore we can't access the ItemCssClass using ItemRowCssClassSelector?.Invoke(item) (the item is not yet loaded).

The current implementation of InvoiceList in Goran handles the issue using placeholders with preset (hard-coded) widths that match the desired widths of the columns. Do you think this is an acceptable solution? If not, then I'll investigate the problem further. To me it seems reasonable since we cannot get the widths of the items before we render them.

image

ItemRowCssClassEffective was added to the placeholder <tr> elements in HxGrid to improve consistency between the placeholder and standard version.