Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26923] Allow an array of Views to be removed at once on ViewProxy

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.0.0
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterRene Pot
AssigneeUnknown
Created2019-03-25T21:01:37.000+0000
Updated2019-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);

Comments

No comments

JSON Source