Inline editing in fixed data table 2

1.3k Views Asked by At

I am using fixed data table 2 to render a JSON object. I want to add an inline editing to the rows of the table when I click a button on the row.

I have gone through the documentation on the link:

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

However I was not able to find the documentation of creating an inline edit in the fixed data table.

1

There are 1 best solutions below

0
On

To cannot edit a row as such, you will have to conditionally change the cell component to include an <input value={...}/> when you click the button of that row.

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


    <Column
      header={<Cell>Col 3</Cell>}
      cell={<MyCustomCell isEditing/>}
      width={2000}
    />