beforeStop(event, ui) {
    const _this = this
    const opts = this.config.opts
    const form = _this.d.stage
    const lastIndex = form.childNodes.length - 1
    const cancelArray = []
    //Find the index within the stage even if the placeholder is not a direct descendant
    _this.stopIndex = ui.placeholder.closest('ul.stage-wrap > *').index() - 1

    //Cancel the sort if sortableControls is disabled and the drop target is the control panel
    if (!opts.sortableControls && ui.item.parent().hasClass('frmb-control')) {
      cancelArray.push(true)
    }

    //Cancel the drop if an element that is not a li.input-control is dropped onto the stage (eg. an input-group container)
    cancelArray.push(ui.item.is(':not(li.input-control,li.input-set-control)') && !ui.item.parent().hasClass('frmb-control') )

    if (opts.prepend) {
      cancelArray.push(_this.stopIndex === 0)
    }

    if (opts.append) {
      cancelArray.push(_this.stopIndex + 1 === lastIndex)
    }

    _this.doCancel = cancelArray.some(elem => elem === true)
  }
jQuery UI sortable beforeStop callback used for both lists.
Logic for canceling the sort or drop.
@param  {Object} event
@param  {Object} ui
@return {void}