FIX: hides dropdown if no actions available
This commit is contained in:
parent
11ba398069
commit
31a8524a80
|
@ -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) {
|
_buildContent(attrs) {
|
||||||
const content = [];
|
const content = [];
|
||||||
|
|
||||||
|
@ -76,6 +83,7 @@ export default createWidget("more-dropdown", {
|
||||||
param: attrs.postEventId
|
param: attrs.postEventId
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -48,6 +48,10 @@
|
||||||
align-self: flex-start;
|
align-self: flex-start;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
|
||||||
|
&.has-no-actions {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.widget-dropdown {
|
.widget-dropdown {
|
||||||
.widget-dropdown-header {
|
.widget-dropdown-header {
|
||||||
.d-icon {
|
.d-icon {
|
||||||
|
|
Loading…
Reference in New Issue