Manual Reference Source
import InputUrlOrFile from 'cloudify-stage/basic/form/InputUrlOrFile.js'
public class | source

InputUrlOrFile

Extends:

react~Component → InputUrlOrFile

InputUrlOrFile is a component showing URL and file input field

Access

Stage.Basic.Form.UrlOrFile

Usage

InputUrlOrFile

<Form.UrlOrFile name="blueprint" value={this.state.blueprintUrl}
                placeholder="Provide the blueprint's URL or click browse to select a file"
                onChangeUrl={this._handleInputChange.bind(this)}
                onFocusUrl={this._onBlueprintUrlFocus.bind(this)}
                onBlurUrl={this._onBlueprintUrlBlur.bind(this)}
                onChangeFile={this._onBlueprintFileChange.bind(this)}
                onResetFile={this._onBlueprintFileReset.bind(this)}
                label={<Label>{this.state.isBlueprintUrlUsed ? 'URL' : 'File'}</Label>}
 />

Static Member Summary

Static Public Members
public static

propTypes

Static Public Members

public static propTypes: * source

propTypes

Properties:

NameTypeAttributeDescription
name string

basename of the field => URL field will be named <name>Url and file field will be named <name>File

value string

text input field value

placeholder string

input field placeholder

label any
  • optional
  • default: null

label to be added to URL input field on the left side

onChangeUrl Function

function to be called on URL change

onFocusUrl Function

function to be called on URL input focus

onBlurUrl Function

function to be called on URL input blur

onChangeFile Function

function to be called on file change

onResetFile Function

function to be called on file reset

fileInputRef object

ref attached to file input