Fix :: Closing of textarea ontype Table widget (#4549)

* fix :: closing of textarea ontype

* fix :: bug not able to clear value
This commit is contained in:
Kiran Ashok 2022-10-31 14:13:25 +05:30 committed by GitHub
parent 2dd9fef0b9
commit 557073df75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -231,12 +231,12 @@ export default function generateColumnsData({
handleCellValueChange(cell.row.index, column.key || column.name, e.target.value, cell.row.original);
}
}}
onChange={(e) => {
if (column.isEditable) {
onKeyDown={(e) => {
e.persist();
if (e.key === 'Enter' && column.isEditable) {
handleCellValueChange(cell.row.index, column.key || column.name, e.target.value, cell.row.original);
}
}}
value={cellValue}
defaultValue={cellValue}
></textarea>
);