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

fillColor of nested tables not being applied when unbreakable is true #2832

Open
bobsquito opened this issue Jan 11, 2025 · 0 comments
Open

Comments

@bobsquito
Copy link

When I run the following code, it should create a table with 1 column and 2 rows

  • one has row "Heading" with a grey fillColor
  • the second row has a fillColor "red" and contains a nested table which is just one cell with the word "Tag".
  • The fillColor of the is green.

When unbreakable = true (as shown in the code below), the fillColor is red (unexpected behaviour) instead of green (expected behaviour). I have not been able to set the fillColor of the tag using the table layout, changing the opacity, nothing works.

When unbreakable is set to false, or removed, the fillColor of the tag is green (expected behaviour).

There does seem to be another bug when the table is set to unbreakable = true and the table is over 1 page in length , the table just disappears. This is sort of documented already in #1159

The following code can be added to the playground.

var dd = {
  unbreakable: true,
  table: {
    body: [
      [
        {
          stack: [{ text: 'Heading' }],
          fillColor: 'grey',
        },
      ],
      [
        {
          fillColor: 'red',
          stack: [
            {
              fillColor: 'green',
              table: {
                body: [[{ text: 'Tag' }]],
                widths: ['auto'],
              },
            },
          ],
        },
      ],
    ],
    widths: ['100%'],
  },
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant