[TIMOB-26923] Allow an array of Views to be removed at once on ViewProxy
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 8.0.0 |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | n/a |
| Reporter | Rene Pot |
| Assignee | Unknown |
| Created | 2019-03-25T21:01:37.000+0000 |
| Updated | 2019-03-25T21:01:37.000+0000 |
Description
When trying to remove an array of views (or better yet, ViewProxy's) to be removed from another view you get an error (it expects a ViewProxy, got an array).
We should allow this to work as
view.add(array) works as well.
var wrapper = Ti.UI.createView();
var buttons = [];
for (var i = 0; i < 10; i++) {
buttons.push(Ti.UI.createButton());
}
// this works
wrapper.add(buttons);
// this triggers error, it should work
wrapper.remove(buttons);
No comments