What is the solution for deprecated getSearchContext() after 4.3?

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

What is the solution for deprecated getSearchContext() after 4.3?

Are you talking about ModelAdmin::getSearchContext() ? (just checking, as there are multiple classes which have a method with this name).

If so, then the deprecation notice provides the hint:

 Deprecation::notice('4.3', 'Will be removed in favor of GridFieldFilterHeader in 5.0');

There’s a bit of discussion about the situation here:

That also has some code snippets regarding how to use GridFieldFilterHeader from people who have encountered the same question.

1 Like

Thank you very much. I am migrating from 4.1 to 4.7.