mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 21:06:58 -04:00
#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:
@@ -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}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user