Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
deichman
Commits
2a2cc011
Commit
2a2cc011
authored
Jun 28, 2021
by
Øyvind Julsrud
Committed by
Oyvind
Jun 28, 2021
Browse files
DEICH-5954
: deichman.no: minor variable rename
parent
220128b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
deichman.no/components/CommandSearch/CommandSearch.js
View file @
2a2cc011
...
...
@@ -11,7 +11,7 @@ const CommandSearch = ({
onClickMenuItem
,
isTypingCommandSearch
})
=>
{
const
f
orwardSlash
=
useKeyPress
(
"
/
"
);
const
isF
orwardSlash
Pressed
=
useKeyPress
(
"
/
"
);
const
[
isShowing
,
setIsShowing
]
=
useState
(
isTypingCommandSearch
);
const
[
searchList
,
setSearchList
]
=
useState
(
commandSearch
);
const
[
commandSearchText
,
setCommandSearchText
]
=
useState
(
""
);
...
...
@@ -36,7 +36,7 @@ const CommandSearch = ({
useEffect
(
()
=>
{
if
(
f
orwardSlash
)
{
if
(
isF
orwardSlash
Pressed
)
{
setIsShowing
(
true
);
}
...
...
@@ -50,7 +50,7 @@ const CommandSearch = ({
setIsShowing
(
false
);
}
},
[
f
orwardSlash
,
searchText
,
isTypingCommandSearch
]
[
isF
orwardSlash
Pressed
,
searchText
,
isTypingCommandSearch
]
);
return
(
...
...
deichman.no/components/CommandSearch/CommandSearchListItem.js
View file @
2a2cc011
...
...
@@ -8,11 +8,11 @@ const CommandSearchListItem = ({
onClickMenuItem
,
commandSearchText
})
=>
{
const
e
nter
=
useKeyPress
(
"
Enter
"
);
const
isE
nter
Pressed
=
useKeyPress
(
"
Enter
"
);
const
handleMenuItemOnClick
=
(
value
,
commandSearchText
,
e
)
=>
{
return
e
=>
{
if
(
!
e
.
key
||
e
nter
)
{
if
(
!
e
.
key
||
isE
nter
Pressed
)
{
onClickMenuItem
(
value
,
commandSearchText
);
}
};
...
...
Benjamin
@bensinober
mentioned in commit
65cd3dd6
·
Jun 29, 2021
mentioned in commit
65cd3dd6
mentioned in commit 65cd3dd6a307920ed1e7e4bf0518eda27ce0c2a5
Toggle commit list
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