mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
field fixes
This commit is contained in:
parent
458a7bf736
commit
4495a998d9
@ -16,6 +16,8 @@ export default function URLInput({
|
||||
isLoading: boolean
|
||||
}): ReactElement {
|
||||
const [field, meta] = useField(props as FieldInputProps<any>)
|
||||
const isButtonDisabled =
|
||||
!field.value || field.value.length === 0 || field.value === ''
|
||||
|
||||
return (
|
||||
<InputGroup>
|
||||
@ -25,12 +27,11 @@ export default function URLInput({
|
||||
type="url"
|
||||
onBlur={(e: React.SyntheticEvent) => handleButtonClick(e, field.value)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
style="primary"
|
||||
size="small"
|
||||
onClick={(e: React.SyntheticEvent) => e.preventDefault()}
|
||||
disabled={!field.value}
|
||||
disabled={isButtonDisabled}
|
||||
>
|
||||
{isLoading ? <Loader /> : submitText}
|
||||
</Button>
|
||||
|
@ -36,6 +36,11 @@ export default function ServicesFields(): ReactElement {
|
||||
component={Input}
|
||||
name="services[0].dataTokenOptions"
|
||||
/>
|
||||
<Field
|
||||
{...getFieldContent('providerUri', content.services.fields)}
|
||||
component={Input}
|
||||
name="services[0].providerUri"
|
||||
/>
|
||||
<Field
|
||||
{...getFieldContent('files', content.services.fields)}
|
||||
component={Input}
|
||||
@ -57,11 +62,6 @@ export default function ServicesFields(): ReactElement {
|
||||
component={Input}
|
||||
name="services[0].timeout"
|
||||
/>
|
||||
<Field
|
||||
{...getFieldContent('providerUri', content.services.fields)}
|
||||
component={Input}
|
||||
name="services[0].providerUri"
|
||||
/>
|
||||
|
||||
{/* {content.services.fields.map(
|
||||
(field: FormFieldContent) =>
|
||||
|
Loading…
Reference in New Issue
Block a user