mirror of
https://github.com/flarum/core.git
synced 2025-08-09 01:46:35 +02:00
Big component restructure/overhaul
This commit is contained in:
20
ember/app/components/ui/controls/item-list.js
Normal file
20
ember/app/components/ui/controls/item-list.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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 (!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.[]')
|
||||
});
|
Reference in New Issue
Block a user