Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
ae719096
Commit
ae719096
authored
Nov 22, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
submit form when pressing enter
parent
cdb00cb2
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
18 deletions
+24
-18
ApiKeyForm.tsx
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
+3
-3
CustomAbiForm.tsx
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
+3
-3
AddressForm.tsx
ui/privateTags/AddressModal/AddressForm.tsx
+3
-3
TransactionForm.tsx
ui/privateTags/TransactionModal/TransactionForm.tsx
+3
-3
PublicTagsForm.tsx
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
+9
-3
AddressForm.tsx
ui/watchlist/AddressModal/AddressForm.tsx
+3
-3
No files found.
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
View file @
ae719096
...
...
@@ -120,7 +120,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
},
[
errors
,
formBackgroundColor
]);
return
(
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
{
data
&&
(
<
Box
marginBottom=
{
5
}
>
<
Controller
...
...
@@ -144,14 +144,14 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
>
{
data
?
'
Save
'
:
'
Generate API key
'
}
</
Button
>
</
Box
>
</>
</
form
>
);
};
...
...
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
View file @
ae719096
...
...
@@ -139,7 +139,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
}
, [ errors, formBackgroundColor ]);
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
>
<
Controller
name=
"contract_address_hash"
...
...
@@ -170,14 +170,14 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
>
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
</
Button
>
</
Box
>
</>
</
form
>
);
};
...
...
ui/privateTags/AddressModal/AddressForm.tsx
View file @
ae719096
...
...
@@ -93,7 +93,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
}
, [ errors, formBackgroundColor ]);
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
name=
"address"
...
...
@@ -119,14 +119,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
isLoading=
{
pending
}
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
</
Button
>
</
Box
>
</>
</
form
>
);
};
...
...
ui/privateTags/TransactionModal/TransactionForm.tsx
View file @
ae719096
...
...
@@ -92,7 +92,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
}, [ errors, formBackgroundColor ]);
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
name=
"transaction"
...
...
@@ -118,14 +118,14 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
<
Box
marginTop=
{
8
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
isLoading=
{
pending
}
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
</
Button
>
</
Box
>
</>
</
form
>
);
};
...
...
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
View file @
ae719096
...
...
@@ -5,6 +5,7 @@ import {
GridItem
,
Text
,
HStack
,
chakra
,
}
from
'
@chakra-ui/react
'
;
import
{
useMutation
,
useQueryClient
}
from
'
@tanstack/react-query
'
;
import
React
,
{
useCallback
,
useState
}
from
'
react
'
;
...
...
@@ -151,7 +152,12 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
},
[
changeToDataScreen
]);
return
(
<
Box
width=
{
{
base
:
'
auto
'
,
lg
:
`calc(100% - ${ ADDRESS_INPUT_BUTTONS_WIDTH }px)`
}
}
maxWidth=
"844px"
>
<
chakra
.
form
noValidate
width=
{
{
base
:
'
auto
'
,
lg
:
`calc(100% - ${ ADDRESS_INPUT_BUTTONS_WIDTH }px)`
}
}
maxWidth=
"844px"
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
{
isAlertVisible
&&
<
Box
mb=
{
4
}
><
FormSubmitAlert
/></
Box
>
}
<
Text
size=
"sm"
variant=
"secondary"
paddingBottom=
{
5
}
>
Company info
</
Text
>
<
Grid
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
4
}
columnGap=
{
5
}
>
...
...
@@ -230,7 +236,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
<
HStack
spacing=
{
6
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
disabled=
{
!
isValid
}
isLoading=
{
mutation
.
isLoading
}
>
...
...
@@ -245,7 +251,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
Cancel
</
Button
>
</
HStack
>
</
Box
>
</
chakra
.
form
>
);
};
...
...
ui/watchlist/AddressModal/AddressForm.tsx
View file @
ae719096
...
...
@@ -151,7 +151,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
), []);
return (
<>
<
form
noValidate
onSubmit=
{
handleSubmit
(
onSubmit
)
}
>
<
Box
marginBottom=
{
5
}
>
<
Controller
name=
"address"
...
...
@@ -189,14 +189,14 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Box
marginTop=
{
8
}
>
<
Button
size=
"lg"
onClick=
{
handleSubmit
(
onSubmit
)
}
type=
"submit"
isLoading=
{
pending
}
disabled=
{
!
isValid
}
>
{
data
?
'
Save changes
'
:
'
Add address
'
}
</
Button
>
</
Box
>
</>
</
form
>
);
};
...
...
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