#124/get items by group (#147)

* Add getItemsByGroup function

* Update test

* update readme

* Update README for submit button

* Update docs with ID prop for button and submit components
This commit is contained in:
Keegan Lillo
2016-10-18 09:40:32 -07:00
committed by GitHub
parent 1a63761e43
commit 9c7238d578
3 changed files with 46 additions and 0 deletions
+11
View File
@@ -182,6 +182,17 @@ function ClayConfig(settings, config, $rootContainer, meta) {
});
};
/**
* @param {string} group
* @returns {Array.<ClayItem>}
*/
self.getItemsByGroup = function(group) {
_checkBuilt('getItemsByGroup');
return _items.filter(function(item) {
return item.config.group === group;
});
};
/**
* @returns {Object}
*/