1

我正在使用固定数据表 2 来呈现 JSON 对象。当我单击行上的按钮时,我想向表的行添加内联编辑。

我已经浏览了链接上的文档:

http://schrodinger.github.io/fixed-data-table-2/

但是,我无法在固定数据表中找到创建内联编辑的文档。

4

1 回答 1

0

要无法像这样编辑行,您必须有条件地更改单元格组件以<input value={...}/>在单击该行的按钮时包含一个。

const MyCustomCell = ({ isEditing}) =>
      <Cell>
        {isEditing? "222" : <input value="222" type=number/>}
      </Cell>;


    <Column
      header={<Cell>Col 3</Cell>}
      cell={<MyCustomCell isEditing/>}
      width={2000}
    />
于 2018-05-23T08:14:54.523 回答