mirror of
https://github.com/flarum/core.git
synced 2025-05-09 00:45:25 +02:00
21 lines
580 B
JavaScript
21 lines
580 B
JavaScript
import Ember from 'ember';
|
|
|
|
import ComponentItem from '../items/component-item';
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: 'ul',
|
|
layoutName: 'components/ui/controls/item-list',
|
|
|
|
listItems: function() {
|
|
if (!Ember.isArray(this.get('items'))) return [];
|
|
var listItems = [];
|
|
this.get('items').forEach(function(item) {
|
|
if (item.tagName != 'li') {
|
|
item = ComponentItem.extend({component: item});
|
|
}
|
|
listItems.push(item);
|
|
});
|
|
return listItems;
|
|
}.property('items.[]')
|
|
});
|