Skip to content

Commit

Permalink
"Choose an existing article" should search all articles, not just rel…
Browse files Browse the repository at this point in the history
…evant ones, when relevant articles are available. (#2255)

Currently, when relevant articles are available, "Choose an existing article" only searches among them. This is problematic because the “Choose an existing article” button is meant to serve as a “manual” fallback solution when the relevant articles do not include the one the user is looking for.

Fixes: CV2-6024.
  • Loading branch information
caiosba authored Jan 21, 2025
1 parent c0fa1bb commit 610a1f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/article/MediaArticlesTeamArticles.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const MediaArticlesTeamArticles = ({
let articles = [];
let hasRelevantArticles = false;
// If there are relevant articles, we prioritize and display them
if (props.project_media.relevant_articles_count > 0) {
if (props.project_media.relevant_articles_count > 0 && !textSearch) {
hasRelevantArticles = true;
articles = props.project_media.relevant_articles.edges.map(edge => edge.node);
} else {
Expand Down

0 comments on commit 610a1f8

Please sign in to comment.