[TIMOB-26656] Ti.UI.View: Add "insertViewsAt()" method
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 3.2.2 |
Fix Version/s | n/a |
Components | Android, iOS |
Labels | insert, view |
Reporter | Hans Knöchel |
Assignee | Unknown |
Created | 2018-12-14T13:12:23.000+0000 |
Updated | 2018-12-14T13:16:22.000+0000 |
Description
(Cloned from the scrollable-view ticket)
The Ti.UI.View currently supports the ".add()" method to programmatically append additional views to the end of the collection. However, it has no method to insert one or more views at the beginning (prepend), or somewhere in the middle of the collection.
It would be great to have a method like ".insertViewsAt(idx, views)" so one item (or more) can be prepended or inserted at specific locations without requiring the entire views collection to be re-bound and rendered.
PoC: https://github.com/hansemannn/titanium_mobile/commit/0db641aad8a905f0081fcaf858c5afa1452dbe59