Skip to content

Provide Table.Cell  #5776

Closed
react-component/table
#171

Description

@afc163

Replace original plain object.

const columns = [{
  title: "xxx",
  className: "classNameOfColumn",
  render: () => <Table.Cell className="" onClick={} rowSpan={}>xxx</Table.Cell>,
}]

@yesmeck what do you think?

Activity

  1. yesmeck commented on Apr 15, 2017

    @yesmeck
    Member

    Looks good to me.

  2. plandem commented on Apr 16, 2017

    @plandem
    Contributor

    depends on performance.

  3. paranoidjk commented on May 19, 2017

    @paranoidjk
    Contributor

    what's the proposal api looks like?

  4. yesmeck commented on May 24, 2017

    @yesmeck
    Member

    One problem if we provide Table.Cell, consider following situation:

    const columns = [{
      title: 'Name',
      dataIndex: 'name',
      key: 'name',
      render: () => <Table.Cell className="foo">xxx</Table.Cell>,
    }];
    
    const data = [{
      key: 1,
      name: 'a',
      children: [{
        key: 11,
        name: 'aa',
      }],
    }];
    
    <Table
      columns={columns}
      data={data}
    />

    If use Table.Cell in the first column, we can not insert the expand icon the first column any more.

  5. yesmeck commented on May 27, 2017

    @yesmeck
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions