helper to clear the view
This commit is contained in:
parent
45a2c707da
commit
4752732bf8
@ -52,6 +52,11 @@ class ListView < ElementView
|
||||
element.remove
|
||||
end
|
||||
|
||||
# remove all elements and views, basically resetting the list to empty
|
||||
def clear_view
|
||||
remove_first while( ! @children.empty? )
|
||||
end
|
||||
|
||||
# append a View instnace to the children array
|
||||
# render it and append it to the html element
|
||||
# and keep a copy in @elements
|
||||
|
Loading…
x
Reference in New Issue
Block a user