ExistingRow($clickRow);
      }
    });

    // close active row on clicking away
    $('body').on('click', function (e) {
      var $target = $(e.target);
      var $activeRow = $('.list-view-pf-editable.active:not(.hidden)');
      if ($activeRow.length &&
        e.target.id !== 'add-a-row' &&
        !$target.is('.list-view-pf-edit') &&
        !$target.closest('.modal').length &&
        !$target.closest('.list-view-pf-editable.active', '.list-view-pf').length) {
        if ($activeRow.find('.list-view