[Bug] [iOS] If ListView.BeginRefresh is called from the SearchBar.SearchButtonPressed event handler, top items in the list are hidden by the search bar.
#6,353 opened on 2019/05/29
Repository metrics
- Stars
- (5,644 個のスター)
- PR merge metrics
- (30d に merged PR はありません)
説明
Description
On iOS, if ListView.BeginRefresh is called from the SearchBar.SearchButtonPressed event handler, the top items in the ListView are hidden when the refresh completes.
This does not happen on Android. There is a similar, but different bug that also occurs only on iOS here: https://github.com/xamarin/Xamarin.Forms/issues/5918 The above bug may be related to this bug.
Steps to Reproduce
- Open the attached test project
- Run the iOS project to an iOS simulator (tested on a iPhone Xr 12.2 simulator)
- Enter some text in the search bar and hit the Search button on the soft keyboard (or Return if using a hardware keyboard)
Expected Behavior
The top two list items, titled Hidden Item 1 and Hidden Item 2 should show at the top of the list.
Actual Behavior
The top two list items, titled Hidden Item 1 and Hidden Item 2 do not show at the top of the list.
Notes
Calling ListView.BeginRefresh from the SearchBar.TextChanged event handler does not cause the issue, nor if calling from a button click event handler. These are implemented in the test project so you can test this yourself.
Slight correction: the issue will occur when ListView.BeginRefresh is called from the SearchBar.TextChanged event handler if the characters are typed in quick succession, but only the top list item is hidden in this case.
Basic Information
- Version with issue: 4.0.0425677
- Last known good version: Unknown
- IDE: VS4M
- Platform Target Frameworks:
- iOS: 12.2