click-ui icon indicating copy to clipboard operation
click-ui copied to clipboard

Option to align table data

Open FranciscoMRCosta opened this issue 2 years ago • 1 comments

In this issue and this design, the columns with numeric data (numbers) are right aligned. Currently it is not possible to defined the alignment of the table cells.

FranciscoMRCosta avatar Dec 22 '23 15:12 FranciscoMRCosta

理论上你可以在items里设置align

const [rows, setRows] = useState<Array<TableRowType>>([
    {
      id: "row-1",
      items: [
        { label: "Alfreds Futterkiste" ,align:"center"},
        { label: "Maria Anders" },
        { label: "Germany" },
      ],
    },
    {
      id: "row-2",
      items: [
        { label: "Centro comercial Moctezuma" },
        { label: "Francisco Chang" },
        { label: 8},
      ],
    },
    {
      id: "row-3",
      isDisabled: true,
      items: [
        { label: "Centro comercial Moctezuma" },
        { label: "Francisco Chang" },
        { label: "Mexico" },
      ],
    },
  ]);

shengxinjing avatar Feb 04 '24 15:02 shengxinjing