InputUrlOrFile
Extends:
react~Component → InputUrlOrFile
InputUrlOrFile is a component showing URL and file input field
Access
Stage.Basic.Form.UrlOrFile
Usage
<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: * propTypes |
Static Public Members
public static propTypes: * source
propTypes
Properties:
Name | Type | Attribute | Description |
name | string | basename of the field => URL field will be named |
|
value | string | text input field value |
|
placeholder | string | input field placeholder |
|
label | any |
|
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 |