Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Openreplay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Alireza Baneshi
Openreplay
Commits
fd9b6e16
Unverified
Commit
fd9b6e16
authored
3 years ago
by
Mehdi Osman
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #314 from openreplay/dev
feat(ui) - saved search - search
parents
81f7f5a5
83ebb6c6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/app/components/shared/SavedSearch/components/SavedSearchDropdown/SavedSearchDropdown.tsx
+12
-1
12 additions, 1 deletion
...ch/components/SavedSearchDropdown/SavedSearchDropdown.tsx
with
12 additions
and
1 deletion
frontend/app/components/shared/SavedSearch/components/SavedSearchDropdown/SavedSearchDropdown.tsx
+
12
−
1
View file @
fd9b6e16
...
...
@@ -31,6 +31,8 @@ function Row ({ name, isPublic, onClick, onClickEdit, onDelete }) {
}
function
SavedSearchDropdown
(
props
:
Props
)
{
const
[
query
,
setQuery
]
=
React
.
useState
(
''
);
const
filteredList
=
query
?
props
.
list
.
filter
(
item
=>
item
.
name
.
toLowerCase
().
includes
(
query
.
toLowerCase
()))
:
props
.
list
;
const
onClick
=
(
item
)
=>
{
props
.
applySavedSearch
(
item
)
// props.edit(item.filter)
...
...
@@ -55,7 +57,16 @@ function SavedSearchDropdown(props: Props) {
return
(
<
div
className
=
{
cn
(
stl
.
wrapper
,
'
shadow
'
)
}
>
{
props
.
list
.
map
(
item
=>
(
<
div
className
=
"w-full border p-1"
>
<
input
placeholder
=
'Search'
autoFocus
className
=
"border p-1 w-full rounded"
style
=
{
{
border
:
'
solid thin #ddd
'
}
}
onChange
=
{
(
e
)
=>
setQuery
(
e
.
target
.
value
)
}
/>
</
div
>
{
filteredList
.
map
(
item
=>
(
<
Row
key
=
{
item
.
searchId
}
name
=
{
item
.
name
}
...
...
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