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
faf6c727
Commit
faf6c727
authored
Jan 26, 2023
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable submit button when invalid
parent
ea50d53d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
ApiKeyForm.tsx
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
+2
-2
CustomAbiForm.tsx
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
+2
-2
AddressForm.tsx
ui/privateTags/AddressModal/AddressForm.tsx
+2
-2
TransactionForm.tsx
ui/privateTags/TransactionModal/TransactionForm.tsx
+2
-2
PublicTagsForm.tsx
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
+2
-2
AddressForm.tsx
ui/watchlist/AddressModal/AddressForm.tsx
+2
-2
No files found.
ui/apiKey/ApiKeyModal/ApiKeyForm.tsx
View file @
faf6c727
...
...
@@ -33,7 +33,7 @@ type Inputs = {
const
NAME_MAX_LENGTH
=
255
;
const
ApiKeyForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
onTouched
'
,
defaultValues
:
{
token
:
data
?.
api_key
||
''
,
...
...
@@ -147,7 +147,7 @@ const ApiKeyForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
size=
"lg"
type=
"submit"
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
>
{
data
?
'
Save
'
:
'
Generate API key
'
}
...
...
ui/customAbi/CustomAbiModal/CustomAbiForm.tsx
View file @
faf6c727
...
...
@@ -36,7 +36,7 @@ type Inputs = {
const
NAME_MAX_LENGTH
=
255
;
const
CustomAbiForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
{
control
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
handleSubmit
,
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
formState
:
{
errors
,
isDirty
},
handleSubmit
,
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
contract_address_hash
:
data
?.
contract_address_hash
||
''
,
name
:
data
?.
name
||
''
,
...
...
@@ -174,7 +174,7 @@ const CustomAbiForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
size=
"lg"
type=
"submit"
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
>
{
data
?
'
Save
'
:
'
Create custom ABI
'
}
...
...
ui/privateTags/AddressModal/AddressForm.tsx
View file @
faf6c727
...
...
@@ -34,7 +34,7 @@ type Inputs = {
const
AddressForm
:
React
.
FC
<
Props
>
=
({
data
,
onClose
,
setAlertVisible
})
=>
{
const
apiFetch
=
useApiFetch
();
const
[
pending
,
setPending
]
=
useState
(
false
);
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
onTouched
'
,
defaultValues
:
{
address
:
data
?.
address_hash
||
''
,
...
...
@@ -124,7 +124,7 @@ const AddressForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) => {
<
Button
size=
"lg"
type=
"submit"
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
isLoading=
{
pending
}
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
...
...
ui/privateTags/TransactionModal/TransactionForm.tsx
View file @
faf6c727
...
...
@@ -35,7 +35,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
const
[
pending
,
setPending
]
=
useState
(
false
);
const
formBackgroundColor
=
useColorModeValue
(
'
white
'
,
'
gray.900
'
);
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
mode
:
'
onTouched
'
,
defaultValues
:
{
transaction
:
data
?.
transaction_hash
||
''
,
...
...
@@ -123,7 +123,7 @@ const TransactionForm: React.FC<Props> = ({ data, onClose, setAlertVisible }) =>
<
Button
size=
"lg"
type=
"submit"
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
isLoading=
{
pending
}
>
{
data
?
'
Save changes
'
:
'
Add tag
'
}
...
...
ui/publicTags/PublicTagsForm/PublicTagsForm.tsx
View file @
faf6c727
...
...
@@ -61,7 +61,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
const
apiFetch
=
useApiFetch
();
const
inputSize
=
{
base
:
'
md
'
,
lg
:
'
lg
'
};
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
fullName
:
data
?.
full_name
||
''
,
email
:
data
?.
email
||
''
,
...
...
@@ -236,7 +236,7 @@ const PublicTagsForm = ({ changeToDataScreen, data }: Props) => {
<
Button
size=
"lg"
type=
"submit"
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
isLoading=
{
mutation
.
isLoading
}
>
Send request
...
...
ui/watchlist/AddressModal/AddressForm.tsx
View file @
faf6c727
...
...
@@ -73,7 +73,7 @@ const AddressForm: React.FC<Props> = ({ data, onSuccess, setAlertVisible, isAdd
notificationsDefault
=
data
.
notification_settings
;
}
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
is
Valid
,
is
Dirty
},
setError
}
=
useForm
<
Inputs
>
({
const
{
control
,
handleSubmit
,
formState
:
{
errors
,
isDirty
},
setError
}
=
useForm
<
Inputs
>
({
defaultValues
:
{
address
:
data
?.
address_hash
||
''
,
tag
:
data
?.
name
||
''
,
...
...
@@ -192,7 +192,7 @@ const AddressForm: React.FC<Props> = ({ data, onSuccess, setAlertVisible, isAdd
size=
"lg"
type=
"submit"
isLoading=
{
pending
}
disabled=
{
!
is
Valid
||
!
is
Dirty
}
disabled=
{
!
isDirty
}
>
{
!
isAdd
?
'
Save changes
'
:
'
Add address
'
}
</
Button
>
...
...
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