Skip to content

Commit

Permalink
fix: enableEnhancedBootstrapGrid inserts the rowWrapperNode at the en…
Browse files Browse the repository at this point in the history
…d of the stage instead of using the last position causing controls to always be inserted at the end even if prepend option is set. Use the location of the added Field's LI to append the rowWrapper before moving the LI within the row
  • Loading branch information
lucasnetau committed Oct 3, 2023
1 parent fd83248 commit 5990b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/form-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ function FormBuilder(opts, element, $) {

//If inserting, use the existing index, do not always append to end
if (!insertingNewControl) {
$stage.append(rowWrapperNode)
$li.after(rowWrapperNode)
}

$li.appendTo(colWrapperNode)
Expand Down

0 comments on commit 5990b67

Please sign in to comment.