Skip to content

EuiIcon fails to display SVG url path after initially being rendered with empty eui icon type #3113

@paul-tavares

Description

@paul-tavares

I have a component that will initially render an EuiIcon of type empty and then in a subsquent render, changes that to be a string path to an SVG image. This works only the first time the icon is displayed within the browser session. navigating way from the view and then back fails to display the remote <img with the path to the svg image and instead continues to show the Empty icon. Here is a screen capture of the EuiIcon state when this happens (prop has a path, but Empty Icon is being shown):

image

Interesting that if I change the initial value to NOT be the empty eui icon and just leave that blank (empty string), it seems to work ok.

For reference, here is the code I'm working with: https://github.com/paul-tavares/kibana/blob/eee57667e4ff9ea895174124fecf992f94927f67/x-pack/plugins/ingest_manager/public/applications/ingest_manager/components/package_icon.tsx#L17

Ref. conversation: https://elastic.slack.com/archives/C7QC1JV6F/p1584483704422000

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions