Skip to content

Commit

Permalink
[canvas] Fix image argument form issues (elastic#109767)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
clintandrewhall and kibanamachine committed Aug 27, 2021
1 parent 0778599 commit c5a61f4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class ImageUpload extends React.Component {
onValueChange: PropTypes.func.isRequired,
typeInstance: PropTypes.object.isRequired,
resolvedArgValue: PropTypes.string,
argValue: PropTypes.string,
assets: PropTypes.object.isRequired,
};

constructor(props) {
super(props);

const url = props.resolvedArgValue || null;
const url = props.resolvedArgValue || props.argValue || null;

let urlType = Object.keys(props.assets).length ? 'asset' : 'file';
// if not a valid base64 string, will show as missing asset icon
Expand Down Expand Up @@ -143,7 +143,7 @@ class ImageUpload extends React.Component {
file: <FileForm loading={loading} onChange={this.handleUpload} />,
link: (
<LinkForm
url={url}
url={selectedAsset.id ? '' : url}
inputRef={(ref) => (this.inputRefs.srcUrlText = ref)}
onSubmit={this.setSrcUrl}
/>
Expand Down

0 comments on commit c5a61f4

Please sign in to comment.