How to make changes of text in search filed to cause animated changes in the view?

Following the examples from the official documentation: https://developer.apple.com/documentation/swiftui/adding-a-search-interface-to-your-app

When the user types in the text in the search field, the list is updated with filtered results. How do I cause these changes to be animated?

I tired to put .animated() after the .searchable modifier, the result was what I am looking for, however it also broke the animation of the search field getting/releasing focus.

Answered by WindowsMEMZ in 809316022

The animation(_:value:) modifier might be what you need. You can read full docs about it here.

WindowsMEMZ @ Darock Studio

Accepted Answer

The animation(_:value:) modifier might be what you need. You can read full docs about it here.

WindowsMEMZ @ Darock Studio

How to make changes of text in search filed to cause animated changes in the view?
 
 
Q