Skip to content

Internal table cells render incorrectly #126

@rytkmt

Description

@rytkmt

Hey, first thanks for the great gem!

I wanna render like this.

image

but,

image

    inner_cell = make_table([["A"],["B"]]) { column(0).style(width: 70) }
    information_column_cell = make_table(
      [
        ["", ""],
        [{ content: "aa", colspan: 2 }],
        ["X", inner_cell],
        [{ content: "bb", colspan: 2 }],
      ],
      column_widths: [30, 70]
    ) do
      row(0).style(height: 0)
    end

    table(
      [
        ["", "", "", ""],
        ["a", information_column_cell, "b", "c"]
      ],
      column_widths: [100, 100,100,100]
    ) do
      row(0).style(height: 0)
    end

It can't render internal table cells correctly.

I do not know why, But I happened to render it correctly.

    inner_cell = make_table([["A"],["B"]]) { column(0).style(width: 60) }

    information_column_cell = make_table(
      [
        ["", "", ""],
        [{ content: "aa", colspan: 3 }],
        ["X", { content: inner_cell, colspan: 2 }],
        [{ content: "bb", colspan: 3 }],
      ],
      column_widths: [40, 60, 0]
    ) do
      row(0).style(height: 0)
    end

If i specify the height, it will be drawn incorrectly as well.

    inner_cell = make_table(
      [
        [{
          content: "A",
          height: 100
        }],
        [{
          content: "B",
          height: 200
        }],
      ]
    ) {

      column(0).style(width: 60)
    }

image

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions