[canvas] Fix image argument form issues (#109767)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
2520990e1e
commit
2ed3fcdec1
|
@ -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
|
||||
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Reference in a new issue