Hmm, seems that `.searchable()` is broken in Bills to Budget, when using search tokens, but only in iOS 16.4 - anyone else seen this?

#SwiftUI #iOSdev

Yep - confirmed with a small sample app. The issue is due to the fact that on iPhone, token searches open up a full screen ‘Picker' with a search bar on top, so you can select the tokens, or search manually. The problem is that when hitting the ‘search' button (whether you selected a token or not), it doesn't dismiss the picker to go back to your list, it just sits there.

Feedback filed: FB12105057

#SwiftUI
/cc @ricketson @curtclifton

@matt1corey @ricketson @curtclifton just ran into this now too. If helpful, I'm working around it by clearing out suggestions onSubmit (though it did also require some rejigging of my views)

@phill Interesting - what type is the `searchController` here?

Follow

@matt1corey it’s just an ObservableObject that’s coordinating the search. I have a Published array of suggestions that’s bound to the searchable modifier. Then I’m just clearing it out on submit.

Sign in to participate in the conversation
The Not So Big Company

The home of The Not So Big Company on Mastodon.