Skip to content

Commit 0b83827

Browse files
committed
Added clear method for list
1 parent e3971f9 commit 0b83827

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

js/list.js

+9
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,13 @@ export default class List extends View {
132132
}
133133
}
134134
}
135+
136+
/**
137+
* Clear all rows
138+
*/
139+
clear() {
140+
while (this.$node.firstChild) {
141+
this.$node.removeChild(this.$node.firstChild);
142+
}
143+
}
135144
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@djthorpe/js-framework",
3-
"version": "0.0.25",
3+
"version": "0.0.26",
44
"description": "Javascript Framework",
55
"main": "dist/js/index.js",
66
"scripts": {

0 commit comments

Comments
 (0)