Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-24351](6_2_X):iOS Support "editActions" in listview search-results #9303

Merged
merged 6 commits into from Aug 15, 2017

Conversation

vijaysingh-axway
Copy link
Contributor

}
[filteredTitles addObject:theTitle];
[filteredIndices addObject:NUMUINTEGER([_searchResults count] -1)];
[_searchResults addObject:thisSection];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to the [thisSection count] check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current implementation we are giving option of edit while searching. Suppose there are 2 sections (section1 , section2) in list view and we started search. Suppose we searched for an item of section2 and want to move it in section1. Suppose the keywords which we searched is only available in section2 and not in section1. So it should show section1 with 0 rows and section2 with relevant search results, so that item from section2 to section1 can be moved. Mentioned condition get removed to add section1 with 0 rows, in _searchResults.

In previous implementation, if no result found for searched keyword in section1, section1 was deleted. As edit option was not supported for search result previously, so it was not affecting anything.
if ([thisSection count] > 0) { ...}
Above condition was doing the stuff for removing the section if search result was not found in particular section.

See the 3rd use case ( Search with search bar and listview), which is having move option.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we can still move rows while searching?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Now we can move rows while searching.

@ewieberappc
Copy link
Contributor

ewieberappc commented Aug 14, 2017

I encounter a crash when trying to edit the ListView when search results are displayed. You can see this if you use the third sample code provided in the ticket. Steps are:

  1. Perform a search (I search for "c" because it yields multiple results)
  2. Click the edit button at the top of the screen
  3. Encounter crash

Crash is:

[ERROR] : Script Error {
[ERROR] : column = 13;
[ERROR] : line = 24;
[ERROR] : message = "Invalid update: invalid number of sections. The number of sections contained in the table view after the update (1) must be equal to the number of sections contained in the table view before the update (3), plus or minus the number of sections inserted or deleted (0 inserted, 0 deleted).";
[ERROR] : sourceURL = "file:///Users/Eric/Library/Developer/CoreSimulator/Devices/7C32596E-CA97-463D-A438-C3EBA099E43E/data/Containers/Bundle/Application/51524F84-F394-4F05-82CA-B58F7E3303E2/timob24351.app/app.js";
[ERROR] : }

Copy link
Contributor

@ewieberappc ewieberappc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FR Passed.
Able to perform edit/delete actions on search results for ListViews and TableViews using searchbars

@ewieberappc ewieberappc merged commit 3467019 into tidev:6_2_X Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants