Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
e874bd63
Commit
e874bd63
authored
May 14, 2020
by
Markus Scheidgen
Browse files
Fixed searchbar handling many search quantities.
#347
.
parent
e4191b32
Pipeline
#74906
passed with stages
in 23 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gui/src/components/search/SearchBar.js
View file @
e874bd63
...
@@ -10,7 +10,13 @@ import { apiContext } from '../api'
...
@@ -10,7 +10,13 @@ import { apiContext } from '../api'
* A few helper functions related to format and analyse suggested options
* A few helper functions related to format and analyse suggested options
*/
*/
const
Options
=
{
const
Options
=
{
split
:
(
suggestion
)
=>
suggestion
.
split
(
'
=
'
),
split
:
(
suggestion
)
=>
{
let
[
quantity
,
value
]
=
suggestion
.
split
(
'
=
'
)
if
(
value
&&
searchQuantities
[
quantity
]
&&
searchQuantities
[
quantity
].
many
)
{
value
=
value
.
split
(
'
,
'
)
}
return
[
quantity
,
value
]
},
join
:
(
quantity
,
value
)
=>
`
${
quantity
}
=
${
value
}
`
,
join
:
(
quantity
,
value
)
=>
`
${
quantity
}
=
${
value
}
`
,
splitForCompare
:
(
suggestion
)
=>
{
splitForCompare
:
(
suggestion
)
=>
{
const
[
quantity
,
value
]
=
suggestion
.
split
(
'
=
'
)
const
[
quantity
,
value
]
=
suggestion
.
split
(
'
=
'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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