From dd68b52e5ac9521c4b78aab5bb04e07c08651241 Mon Sep 17 00:00:00 2001 From: James Lucas Date: Sat, 4 Nov 2023 14:43:15 +1100 Subject: [PATCH] feat: store the bootstrap row's id to the rowWapper via data-row-id --- src/js/form-builder.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/form-builder.js b/src/js/form-builder.js index 16435bd2a..22a43dbcd 100644 --- a/src/js/form-builder.js +++ b/src/js/form-builder.js @@ -1148,6 +1148,7 @@ function FormBuilder(opts, element, $) { $targetInsertWrapper.attr('id', rowWrapperNode.id) $targetInsertWrapper.attr('class', rowWrapperNode.className) $targetInsertWrapper.attr('style', '') + $targetInsertWrapper.attr('data-row-id', columnData.rowUniqueId) rowWrapperNode = $targetInsertWrapper } @@ -1393,6 +1394,11 @@ function FormBuilder(opts, element, $) { }, }) + const rowId = h.getRowValue(rowWrapperNode.className) + if (rowId !== '0') { + $(rowWrapperNode).attr('data-row-id',rowId) + } + setupColumnInserts(rowWrapperNode, true) if (opts.enableColumnInsertMenu) { $(rowWrapperNode).off('mouseenter')