FIX: hides dropdown if no actions available

This commit is contained in:
jjaffeux 2020-05-04 10:55:37 +02:00
parent 11ba398069
commit 31a8524a80
2 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,13 @@ export default createWidget("more-dropdown", {
}}
`,
buildClasses(attrs) {
const content = this._buildContent(attrs);
if (!content.length) {
return ["has-no-actions"];
}
},
_buildContent(attrs) {
const content = [];
@ -76,6 +83,7 @@ export default createWidget("more-dropdown", {
param: attrs.postEventId
});
}
return content;
}
});

View File

@ -48,6 +48,10 @@
align-self: flex-start;
margin-top: 1em;
&.has-no-actions {
display: none;
}
.widget-dropdown {
.widget-dropdown-header {
.d-icon {