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

Enable customization of SearchResultsView #426

Closed
oleg-rocks opened this issue Feb 5, 2024 · 1 comment · Fixed by #428
Closed

Enable customization of SearchResultsView #426

oleg-rocks opened this issue Feb 5, 2024 · 1 comment · Fixed by #428

Comments

@oleg-rocks
Copy link

What are you trying to achieve?

We are looking to enhance the user experience in the app by adding a custom empty view for searches that return no results within the ChatChannelListView component on iOS (SwiftUI version).

If possible, how can you achieve this currently?

Currently, there doesn't seem to be a straightforward way to implement this due to the complex nature of the ChatChannelListView component, which is deeply integrated with a lot of internal methods and properties not designed for customization.

What would be the better way?

The ideal solution would be to allow override the default SearchResultsView or at least its EmptyView by adding a viewFactory.makeChannelListSearchResultsEmptyView or viewFactory.makeChannelListSearchResultsView methods as it's done for some components.

GetStream Environment

GetStream Chat version:
latest
GetStream Chat frameworks: StreamChat, StreamChatSwiftUI
iOS version:
14+
Swift version:
5.5+
Xcode version:
14.0.1+
Device:
iPhone only

@oleg-rocks oleg-rocks changed the title Ability to customize SearchResultsView Enable customization of SearchResultsView Feb 5, 2024
@martinmitrevski
Copy link
Contributor

Hey @kirsanov-dev,

Yes, it makes sense to improve the customization of the search results view. We're going to expose a method for the whole search results view, you can handle the empty state differently in your custom implementation.

Follow this PR for updates: #428.

Best, Martin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants