From 08a659d36276c4e1b2fdb456316dad297037b65a Mon Sep 17 00:00:00 2001 From: Clint Andrew Hall Date: Fri, 27 Aug 2021 15:17:05 -0500 Subject: [PATCH] [canvas] Fix image argument form issues (#109767) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- .../canvas_plugin_src/uis/arguments/image_upload/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js index 4597826c031af..15f10617a654e 100644 --- a/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js +++ b/x-pack/plugins/canvas/canvas_plugin_src/uis/arguments/image_upload/index.js @@ -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: , link: ( (this.inputRefs.srcUrlText = ref)} onSubmit={this.setSrcUrl} />