Skip to content

Commit

Permalink
Merge pull request #141 from pughlab/fix-63-hugo-gene
Browse files Browse the repository at this point in the history
Fixed bugs in issue #63 hugo gene symbol auto complete
  • Loading branch information
mickey-ng authored Apr 4, 2024
2 parents fb85e7e + 3d7560b commit 849d1c3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions libs/ui/src/lib/components/CtimsAutoCompleteComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';
import { AutoComplete } from 'primereact/autocomplete';
import { Tooltip } from 'antd';
import styles from "./CtimsAutoCompleteComponent.module.css";
import useGetGenes from '../../../../../apps/web/hooks/useGetGenes';

const AutocompleteField = ({ onChange, ...props }) => {
const { filteredHugoSymbols, loading, searchSymbols } = useGetGenes();
const [selectedHugoSymbol, setSelectedHugoSymbol] = useState([]);
const [selectedHugoSymbol, setSelectedHugoSymbol] = useState([props.value]);
console.log("Props",props.value);

useEffect(() => {
setSelectedHugoSymbol([props.value]);
}, [props.value]);

const arrayContainer = {
// width: '640px',
Expand All @@ -32,8 +37,8 @@ const AutocompleteField = ({ onChange, ...props }) => {
<div className={styles.container}>
{props.schema.title && (
<label style={labelStyle}>
Hugo Gene
<Tooltip title={props.schema.description} placement="topLeft">
Hugo Symbol
<Tooltip>
<i
className={questionMarkStyle}
data-pr-tooltip={props.schema.description}
Expand Down

0 comments on commit 849d1c3

Please sign in to comment.