Copy-Paste Not Working for Read-Only Rows in Handsontable

Tags: #<Tag:0x00007efc648a3100> #<Tag:0x00007efc648a2f98>

Hello,
I’m using Handsontable to create a table that has:
1. Pre-populated rows that are marked as readOnly .
2. An empty, editable row at the bottom where users can add new data.

While the readOnly rows work as expected (they cannot be edited), I also need them to be copyable. However, when I mark these rows as readOnly , the ability to copy data (using Ctrl+C ) from these rows gets disabled.

Here’s the relevant part of my configuration:

    <HotTable
      data={data}
      colHeaders={true}
      rowHeaders={true}
     contextMenu={false}
      copyPaste={true}
      cells={(row, col) => {
        if (row < data.length - 1) {
          return { readOnly: true, copyable: true }; // Pre-populated rows
        }
        return {}; // Editable row
      }}
    />

Hi @thapajunga

It seems that you may have the same issue as this user at Copying values from locked cells does not work. As mentioned there (and listed at https://handsontable.com/docs/javascript-data-grid/disabled-cells/) we can copy values from readOnly cells

07

You can even test that on the same site