Project: titanium
Issue TIMOB-23639: Windows: Updating a tableviewsection with the index of a deleted tableviewsection adds the deleted tableviewsection back
h5.Description When calling updateSection for a tableviewsection with the index number that once referenced a deleted section, it appears that the deleted section is updated and readded to the tableview. The code below does the following: # Create a tableview with two sections # When the window opens, delete the section at index 1 and append a new section # When a tableviewrow is clicked, update the section at index On Android and iOS this code works as expected, with the title of the 2 section being updated {code} var win = Ti.UI.createWindow(); var sectionFruit = Ti.UI.createTableViewSection({	headerTitle: 'Fruit' }); sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Apples' })); sectionFruit.add(Ti.UI.createTableViewRow({ title: 'Bananas' })); var testSection = Ti.UI.createTableViewSection({	headerTitle: 'Test' }); var table = Ti.UI.createTableView({	data: [sectionFruit, testSection] }); win.addEventListener('open', function() {	table.deleteSection(1);	table.appendSection(createSection('newSection'));	var sections = table.sections;	for(var i = 0; i < sections.length; i++) {	console.log(sections[i].headerTitle);	} }); table.addEventListener('click', function() {	table.updateSection(1, createSection('updateSection'));	var sections2 = table.sections;	console.log(table.sections.length);	for(var i = 0; i < sections2.length; i++){	console.log(sections2[i].headerTitle);	} }); function createSection(title){	return section = Ti.UI.createTableViewSection({ headerTitle: title}); } win.add(table); win.open(); {code} h5.Steps to reproduce 1. Using the code above, build for Windows Platform using {{appc run -p windows -T wp-emulator}} 2. Tap one of the rows in the first section h5.Actual result There are now 3 sections Fruit, updateSection and newSection h5.Expected result There should only be 2 sections Fruit and updateSection
Story points: 5