Fixed an issue where paste operation in query tool data grid should skip bytea columns and put the value as NULL instead. #3199
parent
760e38293c
commit
5c5b61c4db
|
@ -194,6 +194,8 @@ Data Editing Options
|
|||
| | | |
|
||||
| | * Click the *Paste with SERIAL/IDENTITY values?* if you want to paste the copied column values | |
|
||||
| | in the serial/identity columns. | |
|
||||
| | | |
|
||||
| | Note that copied row having *Bytea* datatype cell will be pasted as *Null*. | |
|
||||
+----------------------+---------------------------------------------------------------------------------------------------+----------------+
|
||||
| *Delete* | Click the *Delete* icon to mark the selected rows for deletion. These marked rows get deleted | Option/Alt + |
|
||||
| | | Shift + D |
|
||||
|
|
|
@ -1257,6 +1257,16 @@ export function ResultSet() {
|
|||
selectedRowsSorted.sort();
|
||||
insPosn = _.findIndex(rows, (r)=>rowKeyGetter(r)==selectedRowsSorted[selectedRowsSorted.length-1])+1;
|
||||
}
|
||||
let byteaCellSelection = columns.filter(o=>o.type=='bytea');
|
||||
if (byteaCellSelection.length>0) {
|
||||
_rows = _rows.map(x=>{
|
||||
byteaCellSelection.forEach(r=>{
|
||||
x[r.pos]=null;
|
||||
return x;
|
||||
});
|
||||
return x;
|
||||
});
|
||||
}
|
||||
let newRows = rsu.current.processRows(_rows, columns, fromClipboard, pasteSerials);
|
||||
setRows((prev)=>[
|
||||
...prev.slice(0, insPosn),
|
||||
|
|
|
@ -142,6 +142,7 @@ export function ResultSetToolbar({query,canEdit, totalRowCount}) {
|
|||
});
|
||||
}, []);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
eventBus.registerListener(QUERY_TOOL_EVENTS.DATAGRID_CHANGED, (isDirty)=>{
|
||||
setDisableButton('save-data', !isDirty);
|
||||
|
|
Loading…
Reference in New Issue