Browse Source

Fixed an issue causing invisibility of Table elements containing only Header/Footer elements without content.

Marcin Ziąbek 1 year ago
parent
commit
5e82e29a53

+ 1 - 1
Source/QuestPDF/Fluent/TableExtensions.cs

@@ -143,7 +143,7 @@ namespace QuestPDF.Fluent
                 .Decoration(decoration =>
                 .Decoration(decoration =>
                 {
                 {
                     decoration.Before().Element(HeaderTable);
                     decoration.Before().Element(HeaderTable);
-                    decoration.Content().Element(ContentTable);
+                    decoration.Content().ShowIf(ContentTable.Cells.Any()).Element(ContentTable);
                     decoration.After().Element(FooterTable);
                     decoration.After().Element(FooterTable);
                 });
                 });
 
 

+ 1 - 0
Source/QuestPDF/Resources/ReleaseNotes.txt

@@ -25,3 +25,4 @@ Bug Fixes:
 Version 2024.6.1
 Version 2024.6.1
 - Text element: improved the default sizing behavior for the Text element. Now, when the text is empty, it works more consistently by taking up zero width while still reserving vertical space based on the font size.
 - Text element: improved the default sizing behavior for the Text element. Now, when the text is empty, it works more consistently by taking up zero width while still reserving vertical space based on the font size.
 - Fixed compatibility with .NET Standard 2.0.
 - Fixed compatibility with .NET Standard 2.0.
+- Fixed an issue causing invisibility of Table elements containing only Header/Footer elements without content.