Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
ecc621fc
Commit
ecc621fc
authored
Dec 09, 2018
by
YiChia Huang
Committed by
chicm-ms
Dec 10, 2018
Browse files
added search trail by id function (#455)
parent
c265903e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/webui/src/components/TrialsDetail.tsx
src/webui/src/components/TrialsDetail.tsx
+4
-5
No files found.
src/webui/src/components/TrialsDetail.tsx
View file @
ecc621fc
...
@@ -201,14 +201,13 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
...
@@ -201,14 +201,13 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
}
}
// search a specific trial by trial No.
// search a specific trial by trial No.
searchTrialNo
=
(
value
:
string
)
=>
{
searchTrial
=
(
value
:
string
)
=>
{
window
.
clearInterval
(
this
.
interTableList
);
window
.
clearInterval
(
this
.
interTableList
);
const
{
tableBaseSource
}
=
this
.
state
;
const
{
tableBaseSource
}
=
this
.
state
;
const
searchResultList
:
Array
<
TableObj
>
=
[];
const
searchResultList
:
Array
<
TableObj
>
=
[];
Object
.
keys
(
tableBaseSource
).
map
(
key
=>
{
Object
.
keys
(
tableBaseSource
).
map
(
key
=>
{
const
item
=
tableBaseSource
[
key
];
const
item
=
tableBaseSource
[
key
];
if
(
item
.
sequenceId
.
toString
()
===
value
)
{
if
(
item
.
sequenceId
.
toString
()
===
value
||
item
.
id
.
includes
(
value
)
)
{
searchResultList
.
push
(
item
);
searchResultList
.
push
(
item
);
}
}
});
});
...
@@ -285,8 +284,8 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
...
@@ -285,8 +284,8 @@ class TrialsDetail extends React.Component<{}, TrialDetailState> {
</
Col
>
</
Col
>
<
Col
span
=
{
12
}
className
=
"btns"
>
<
Col
span
=
{
12
}
className
=
"btns"
>
<
Search
<
Search
placeholder
=
"
input
search Trial No."
placeholder
=
"search
by
Trial No.
and id
"
onSearch
=
{
value
=>
this
.
searchTrial
No
(
value
)
}
onSearch
=
{
value
=>
this
.
searchTrial
(
value
)
}
style
=
{
{
width
:
200
}
}
style
=
{
{
width
:
200
}
}
id
=
"searchTrial"
id
=
"searchTrial"
/>
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment