Commit f5a07117 authored by Rajat Jain's avatar Rajat Jain

Append prioritized label before pagination

parent f60bf03f
......@@ -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');
......
---
title: Append prioritized label before pagination
merge_request: 24815
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment