Merge pull request #12862 from frappe/mergify/bp/version-13-pre-release/pr-12861
fix: Multi-column paste in grid (backport #12861)
This commit is contained in:
commit
74a27a8bb3
1 changed files with 4 additions and 1 deletions
|
|
@ -45,9 +45,12 @@ frappe.ui.form.ControlTable = frappe.ui.form.Control.extend({
|
|||
} else {
|
||||
// no column header, map to the existing visible columns
|
||||
const visible_columns = grid_rows[0].get_visible_columns();
|
||||
let target_column_matched = false;
|
||||
visible_columns.forEach(column => {
|
||||
if (column.fieldname === $(e.target).data('fieldname')) {
|
||||
// consider all columns after the target column.
|
||||
if (target_column_matched || column.fieldname === $(e.target).data('fieldname')) {
|
||||
fieldnames.push(column.fieldname);
|
||||
target_column_matched = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue