Skip to content

Commit

Permalink
add List.clearItems method. fixes #40.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Apr 26, 2014
1 parent 9a96116 commit fe08f9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/widget.js
Expand Up @@ -4224,6 +4224,10 @@ List.prototype.removeItem = function(child) {
}
};

List.prototype.clearItems = function() {
return this.setItems([]);
};

List.prototype.setItems = function(items) {
var items = items.slice()
, original = this.items.slice()
Expand Down

0 comments on commit fe08f9e

Please sign in to comment.