Fixed members filter list reloading on label edit

closes https://github.com/TryGhost/Team/issues/975

Clicking on label edit in filtering menu was also causing label to be selected in the dropdown, which also caused members list to live reload. This change fixes the edit behavior by not selecting the label to be edited in the dropdown
This commit is contained in:
Rishabh 2021-09-07 16:50:29 +05:30
parent e70e0e273d
commit 0231c08fde
2 changed files with 7 additions and 1 deletions

View File

@ -22,7 +22,7 @@
{{label.name}}
</span>
{{#if label.slug}}
<span class="dropdown-action-icon" {{on "click" (fn @onLabelEdit label.slug)}}>
<span class="dropdown-action-icon" {{on "mouseup" (fn this.editLabel label)}}>
{{svg-jar "pen"}}
</span>
{{/if}}

View File

@ -58,6 +58,12 @@ export default class GhMemberLabelInputLabs extends Component {
this.args.onChange(newLabels);
}
@action
editLabel(label, event) {
event.stopPropagation();
this.args.onLabelEdit?.(label.slug);
}
@action
createLabel(labelName) {
let currentLabels = this.selectedLabels;