Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon/components/layout/header.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
<div class="w-6">
{{#if menuItem.iconComponent}}
{{component menuItem.iconComponent options=menuItem.iconComponentOptions}}
{{component (lazy-engine-component menuItem.iconComponent) options=menuItem.iconComponentOptions}}
{{else}}
<FaIcon @icon={{menuItem.icon}} @prefix={{menuItem.iconPrefix}} @size="sm" />
{{/if}}
Expand Down
4 changes: 2 additions & 2 deletions addon/components/layout/header/dropdown/item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div class="{{@item.class}}">
{{#if line.component}}
{{component
line.component
(lazy-engine-component line.component)
item=line
text=line.text
label=(or line.label line.text)
Expand Down Expand Up @@ -108,5 +108,5 @@
{{/if}}

{{#if this.isComponent}}
{{component @item.component @item}}
{{component (lazy-engine-component @item.component) @item}}
{{/if}}
3 changes: 3 additions & 0 deletions addon/components/layout/header/dropdown/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { inject as service } from '@ember/service';
import { computed, action } from '@ember/object';
import { isBlank } from '@ember/utils';
import { bool } from '@ember/object/computed';
import { ExtensionComponent } from '@fleetbase/ember-core/contracts';
import isMenuItemActive from '../../../../utils/is-menu-item-active';
import isEmptyObject from '../../../../utils/is-empty-object';

Expand All @@ -20,6 +21,8 @@ export default class LayoutHeaderDropdownItemComponent extends Component {
}

@computed('args.item.{component,onClick}') get isComponent() {
if (this.args.item.component instanceof ExtensionComponent) return true;

return this.args.item && typeof this.args.item.component === 'string' && typeof this.args.item.onClick !== 'function';
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fleetbase/ember-ui",
"version": "0.3.15",
"version": "0.3.16",
"description": "Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.",
"keywords": [
"fleetbase-ui",
Expand Down