Skip to content

[iOS&Mac] Shell SearchHandler Query not shown in search bar on initial load #35005

@SubhikshaSf4851

Description

@SubhikshaSf4851

Description

When the Query property is set during the initial load, the value is not reflected or updated in the UI on iOS and Mac Catalyst platforms. However, this behavior works as expected on Android and Windows.

Steps to Reproduce

// In your ContentPage constructor or OnAppearing
var searchHandler = new SearchHandler
{
    Placeholder = "Search items...",
    Query = "Initial query",
};
Shell.SetSearchHandler(this, searchHandler);
  • Attach the above sample on MainPage.Xaml.cs
  • Run on iOS or MacCatalyst.

Expected Behavior : The search bar displays "Initial query" on first load.
Actual Behavior : The search bar holds placeholder text.

Actual Behavior Expected Behavior
Image Image

Link to public reproduction project repository

No response

Version with bug

10.0.0

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions