Xamarin.forms: [Bug] Shell SearchHandler - Search text getting lost on execute search

Created on 6 Jul 2019  路  6Comments  路  Source: xamarin/Xamarin.Forms

Description

When using the Xamarin.Forms Shell template and upgrade to Xamarin.Forms 4.1 (I did not test with 4.0 yet), the SearchHandler is removing the search term on enter/search execution.

SearchHandlerBug

Steps to Reproduce

  1. Create a fresh Xamarin.Forms Shell project
  2. Add a search handler

Expected Behavior

It should keep the searched term.

Actual Behavior

It losts the content.

Basic Information

  • Version with issue: 4.1.0
  • Last known good version: -
  • IDE: VS2019 and VS for Mac
  • Platform Target Frameworks:

    • iOS: Tested with iOS 12 Simulator

Screenshots

Already added above in the description.

Reproduction Link

Reproduction can be done with the VS template within a minute.

shell in-progress Android iOS 馃崕 bug

Most helpful comment

Any workarounds till the issue is fixed?

All 6 comments

Issue is here on 4.0 as well.

Repro (took 5 minutes):
_6804 Repro.zip

Happens on iOS and Android.

This is really annoying. Please, fix this problem.

Any workarounds till the issue is fixed?

This doesn't seem to be fixed for iOS because as soon as I lose focus (manually call _searchController.Active = false) the text is removed again.

Furthermore, xamarin forms 4.5 disables the ui for ios when the search controller is active, not allowing me to scroll any of the results or interact with them.

@GeorgeVelikov
Setting the Active property on a UISearchController to false will clear its search text. This is the native behaviour on iOS and what was removed in #8101.

I am able to scroll a list while the search controller is active in 4.5. Would you be able to provide a sample solution and possibly create a separate issue?

Was this page helpful?
0 / 5 - 0 ratings