Skip to content

expand by column: expandable={false} not working while column is custom format #1463

Open
@sxhuan

Description

@sxhuan

click the cell with button or badge still can expand the row

settingFormatter(cell, row){
    return (
      <span>
        <Button role='button' className="btn btn-outline-info" onClick={() => this.props.loadOffSideBar(true, ACT_TYPE_EDIT, row.id, row.name, row.text)} ><FontAwesome name='pencil' /></Button>
        <Button role='button' className="btn btn-outline-danger ml-3" onClick={() => this.props.deleteEvent(row)} ><FontAwesome name='times' /></Button>
      </span>
    );
  }
  statusFormatter(cell, row){
    return (
      <span>
        {row.isPublish ?
          <Badge color='success' className="p-2">Published</Badge>:
          <Badge color='warning' className="p-2">Draft</Badge>
        }
      </span>
    );
  }
<TableHeaderColumn dataField="status" dataAlign="center" expandable={ false } dataFormat={this.statusFormatter}>
                Status
              </TableHeaderColumn>
              <TableHeaderColumn dataField="setting" dataAlign="center" expandable={ false } dataFormat={this.settingFormatter}>
                {this.renderCustomHeader()}
              </TableHeaderColumn>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions