Commit d6b39ea7 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '24875-label' into 'master'

Append prioritized label before pagination

Closes #24875

See merge request gitlab-org/gitlab-ce!24815
parents 6da156ab f5a07117
...@@ -70,7 +70,18 @@ export default class LabelManager { ...@@ -70,7 +70,18 @@ export default class LabelManager {
const $detachedLabel = $label.detach(); const $detachedLabel = $label.detach();
this.toggleLabelPriorityBadge($detachedLabel, action); this.toggleLabelPriorityBadge($detachedLabel, action);
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); $detachedLabel.appendTo($target);
}
if ($from.find('li').length) { if ($from.find('li').length) {
$from.find('.empty-message').removeClass('hidden'); $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