Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
82a8ed02
Commit
82a8ed02
authored
5 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed broken additional search keys.
parent
54a778c6
No related branches found
No related tags found
2 merge requests
!115
V0.8.0 beta
,
!113
V0.8.0
Pipeline
#71586
passed
5 years ago
Stage: build
Stage: test
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gui/src/components/search/SearchBar.js
+2
-3
2 additions, 3 deletions
gui/src/components/search/SearchBar.js
with
2 additions
and
3 deletions
gui/src/components/search/SearchBar.js
+
2
−
3
View file @
82a8ed02
import
React
from
'
react
'
import
React
from
'
react
'
import
PropTypes
from
'
prop-types
'
import
PropTypes
from
'
prop-types
'
import
{
withStyles
}
from
'
@material-ui/core/styles
'
import
{
withStyles
}
from
'
@material-ui/core/styles
'
import
{
domains
}
from
'
../domains
'
// TODO this causes a weird import bug
import
{
domains
}
from
'
../domains
'
// TODO this causes a weird import bug
import
ChipInput
from
'
material-ui-chip-input
'
import
ChipInput
from
'
material-ui-chip-input
'
import
Autosuggest
from
'
react-autosuggest
'
import
Autosuggest
from
'
react-autosuggest
'
import
match
from
'
autosuggest-highlight/match
'
import
match
from
'
autosuggest-highlight/match
'
...
@@ -15,7 +15,6 @@ import SearchContext from '../search/SearchContext'
...
@@ -15,7 +15,6 @@ import SearchContext from '../search/SearchContext'
import
{
withApi
}
from
'
../api
'
import
{
withApi
}
from
'
../api
'
import
ClearIcon
from
'
@material-ui/icons/Cancel
'
import
ClearIcon
from
'
@material-ui/icons/Cancel
'
function
renderInput
(
inputProps
)
{
function
renderInput
(
inputProps
)
{
const
{
classes
,
autoFocus
,
value
,
onChange
,
onAdd
,
onDelete
,
chips
,
ref
,
...
other
}
=
inputProps
const
{
classes
,
autoFocus
,
value
,
onChange
,
onAdd
,
onDelete
,
chips
,
ref
,
...
other
}
=
inputProps
...
@@ -163,7 +162,7 @@ class SearchBar extends React.Component {
...
@@ -163,7 +162,7 @@ class SearchBar extends React.Component {
const
reStr
=
`^(
${
Object
.
keys
(
domain
.
additionalSearchKeys
).
join
(
'
|
'
)}
)=`
const
reStr
=
`^(
${
Object
.
keys
(
domain
.
additionalSearchKeys
).
join
(
'
|
'
)}
)=`
const
additionalSearchKeyRE
=
new
RegExp
(
reStr
)
const
additionalSearchKeyRE
=
new
RegExp
(
reStr
)
const
match
=
value
.
match
(
additionalSearchKeyRE
)
const
match
=
value
.
match
(
additionalSearchKeyRE
)
if
(
match
&&
this
.
props
.
domain
.
additionalSearchKeys
[
match
[
1
]])
{
if
(
match
&&
domain
.
additionalSearchKeys
[
match
[
1
]])
{
suggestions
.
push
({
suggestions
.
push
({
key
:
match
[
1
],
key
:
match
[
1
],
value
:
valueWithCase
.
substring
(
match
[
0
].
length
)
value
:
valueWithCase
.
substring
(
match
[
0
].
length
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment