Append prioritized label before pagination

This commit is contained in:
Rajat Jain 2019-01-31 11:08:55 +05:30
parent f60bf03f5c
commit f5a0711732
2 changed files with 17 additions and 1 deletions

View File

@ -70,7 +70,18 @@ export default class LabelManager {
const $detachedLabel = $label.detach();
this.toggleLabelPriorityBadge($detachedLabel, action);
$detachedLabel.appendTo($target);
const $labelEls = $target.find('li.label-list-item');
/*
* If there is a label element in the target, we'd want to
* append the new label just right next to it.
*/
if ($labelEls.length) {
$labelEls.last().after($detachedLabel);
} else {
$detachedLabel.appendTo($target);
}
if ($from.find('li').length) {
$from.find('.empty-message').removeClass('hidden');

View File

@ -0,0 +1,5 @@
---
title: Append prioritized label before pagination
merge_request: 24815
author:
type: fixed