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:
Suraj Shetty 2021-04-15 16:39:00 +05:30 committed by GitHub
commit 74a27a8bb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
});
}