fix fuzzy / keyword names on chips
This commit is contained in:
+4
-1
@@ -212,6 +212,9 @@ export class UniTrendParentComponent implements OnInit {
|
||||
|
||||
getMappedTopic(topicOrKeyword: string): string {
|
||||
if (!topicOrKeyword) return '';
|
||||
if (!this.isFuzzy()) {
|
||||
return topicOrKeyword;
|
||||
}
|
||||
|
||||
const cleanId = cleanEntityId(topicOrKeyword);
|
||||
const isTopicId =
|
||||
@@ -1040,7 +1043,7 @@ export class UniTrendParentComponent implements OnInit {
|
||||
updateUrlParams() {
|
||||
const queryParams: any = {
|
||||
search_type: this.selectedSearchType(),
|
||||
trend_topics: this.selectedTrendTopics(),
|
||||
trend_topics: this.isFuzzy() ? this.selectedTrendTopics() : null,
|
||||
institutions:
|
||||
this.comparisonInstitutions().length > 0
|
||||
? this.comparisonInstitutions().map(
|
||||
|
||||
@@ -66,10 +66,10 @@ export const uniTrendResolver: ResolveFn<UniTrendResolvedData> = (
|
||||
keywords = searchState.keywords();
|
||||
}
|
||||
|
||||
let topics = [
|
||||
...params.getAll('trend_topics'),
|
||||
...params.getAll('trend_topic'),
|
||||
];
|
||||
let topics = fuzzy
|
||||
? [...params.getAll('trend_topics'), ...params.getAll('trend_topic')]
|
||||
: [];
|
||||
|
||||
if (topics.length === 0) {
|
||||
const rawTopicsList = [
|
||||
...params.getAll('topic'),
|
||||
@@ -97,6 +97,7 @@ export const uniTrendResolver: ResolveFn<UniTrendResolvedData> = (
|
||||
? searchState.topicsList()
|
||||
: searchState.keywords();
|
||||
if (
|
||||
!fuzzy ||
|
||||
topics.length === 0 ||
|
||||
(fuzzy &&
|
||||
stateTopics.length > 0 &&
|
||||
|
||||
Reference in New Issue
Block a user