[AC-3369] Bug in tableview methods: "insertRowBefore", "insertRowAfter", "insertSectionBefore", "insertSectionAfter" - "animation" option has no effect
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2016-03-20T17:10:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | n/a |
Reporter | Parijat sahai |
Assignee | Mostafizur Rahman |
Created | 2016-03-10T16:51:11.000+0000 |
Updated | 2016-03-20T17:10:01.000+0000 |
Description
There is a bug in the following tableview methods: "insertRowBefore", "insertRowAfter", "insertSectionBefore", "insertSectionAfter" where specifying the "animated" property to true has no effect and the tableview still scrolls downwards to show the newly inserted row.
Hello, Please provide a regeneratable sample code for each of the issue you have mentioned above. We will try it in our environment if the issue is regeneratable or not. Please use the latest SDK 5.2.0.GA for your test. Also please provide a complete list of steps to follow. Thanks.
1) Create a sample app with a tableview in the main window. 2) initialize the tableview with about 20 or more rows so that they fill the entire screen when the app is launched. Also, add code during initialization to scroll the tableview to the bottommost row. 3) Add a button somewhere on the screen that when clicked inserts a new row. 4) Write "click" or "singletap" event handler for the button to execute "insertRowBefore(0,{animated:false})" 5) Run the test by launching the app and clicking the button. Notice that, despite the presence of "animated:false" parameter, clicking the button causes the tableview to scroll to display the newly inserted row.
Hello, Thanks for sharing with us. I have tested that issue you reported. It is not a valid issue. Setting "animated:false” is working as expected. And it doesn’t let the tabeview to animate to the newly inserted row. I have tested the below code. *Testing Environment:* *Appcelerator CLI* Installer = 4.2.3 Core Package = 5.2.0 *Operating System* Name = Mac OS X Version = 10.11.3 Architecture = 64bit # CPUs = 4 Memory = 8.0GB *Node.js* Node.js Version = 0.12.7 npm Version = 2.11.3 *Titanium CLI* CLI Version = 5.0.6 node-appc Version = 0.2.31 *Java Development Kit* Version = 1.7.0_25 *Xcode:* Version 7.1.1 *Titanium SDK:* 5.2.0.GA *Platform:* iOS *iOS Simulator:* iPhone 6/ iOS 9.1 *Test Code:*
*Test Result* It doesn’t animate when clicking the button in the tableview during display the newly inserted row. *Steps to Reproduce.* Open your Studio Create new project Copy the above code and paste it in *app.js* file Run the project Click the “*Click Me*” button to create new row.