Skip to content

Commit

Permalink
feat: store the bootstrap row's id to the rowWapper via data-row-id
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasnetau committed Nov 4, 2023
1 parent fcff9e9 commit dd68b52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit dd68b52

Please sign in to comment.