Skip to content

Commit

Permalink
NN-588 Added search bar to citation & term view
Browse files Browse the repository at this point in the history
  • Loading branch information
TripZz committed Sep 20, 2024
1 parent d342727 commit dc71ebd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/interface/SearchField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
<script>
export default {
name: "SearchField",
props: ["data", "active_node"],
emits: ["active_node_changed"],
props: ["data", "mode"],
data() {
return {
search_raw: "",
Expand All @@ -65,7 +64,7 @@ export default {
methods: {
select_node(node) {
if (node)
this.emitter.emit("searchNode", { node: node, mode: "protein" });
this.emitter.emit("searchNode", { node: node, mode: this.mode });
},
google_search(protein, index) {
document
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/verticalpane/VerticalPane.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<div id="vertical-pane">
<SearchField :data="gephi_data"></SearchField>
<SearchField
:data="gephi_data"
:mode="mode"
></SearchField>
<div class="upper-block">
<div class="tab-system">
<ul>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/verticalpane/VerticalPaneCitation.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div id="vertical-pane">
<SearchField
:data="citation_data"
:mode="mode"
></SearchField>
<div class="upper-block">
<div class="tab-system">
<ul>
Expand Down Expand Up @@ -73,6 +77,7 @@ import CitationList from "@/components/citation/CitationList.vue";
import CitationCommunities from "@/components/citation/CitationCommunities.vue";
import CitationSummary from "@/components/citation/CitationSummary.vue";
import PathwayMenu from "@/components/enrichment/PathwayMenu.vue";
import SearchField from "@/components/interface/SearchField.vue";
export default {
name: "VerticalPaneCitation",
Expand All @@ -82,6 +87,7 @@ export default {
CitationSummary,
CitationCommunities,
PathwayMenu,
SearchField
},
data() {
return {
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/verticalpane/VerticalPanePathway.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<template>
<div id="vertical-pane">
<SearchField
:data="term_data"
:mode="mode"
></SearchField>
<div class="upper-block">
<div class="tab-system">
<ul>
Expand Down Expand Up @@ -51,13 +55,15 @@
<script>
import PathwayGraphMenu from "@/components/pathwaytools/PathwayGraphMenu.vue";
import PathwayMenu from "@/components/enrichment/PathwayMenu.vue";
import SearchField from "@/components/interface/SearchField.vue";
export default {
name: "VerticalPanePathway",
props: ["term_data"],
components: {
PathwayGraphMenu,
PathwayMenu,
SearchField
},
data() {
return {
Expand Down

0 comments on commit dc71ebd

Please sign in to comment.