Nested child tables are aligned only when the header of the child table is displayed (in the same style as the parent table), but not when showHeader= {false}

  • now hide the child header, showHeader= {false}, and the columns of the child table cannot be aligned with the columns of the parent table, even if the settings are the same width
< hr >
showHeader can only be used with fixed headers.
< hr >

column style:

detailsColumns = [
    {
      title: "",
      dataIndex: "name",
      align: "left",
      ...
    }, {
      title: "",
      dataIndex: "comment",
      align: "left",
      ....
    }, {
      title: "",
      dataIndex: "deptName",
      filterMultiple: false,
      width: 130,
      align: "left",
    }, {
      title: "",
      dataIndex: "userName",
      align: "left",
      width: 130,
    }, {
      title: "",
      dataIndex: "status",
      width: 100,
      ....
    }, {
      title: "",
      dataIndex: "version",
      align: "center",
      width: 80,
      ....
    }, {
      title: "",
      dataIndex: "todo",
      align: "left",
      width: 100,
      ... 
    }];
    


< hr >
do not hide child headers:

clipboard.png


:

clipboard.png

May.24,2021

go to the antd official to mention issue .


showHeader must be used with fixed headers

< hr >

set all the styles of the parent table and child table to percentage form

Menu