Skip to content

Commit

Permalink
[canvas] Fix image argument form issues (#109767) (#110412)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Clint Andrew Hall <[email protected]>
  • Loading branch information
kibanamachine and clintandrewhall authored Aug 27, 2021
1 parent ebe3ef1 commit fe642d0
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 fe642d0

Please sign in to comment.