Using EUI inside FieldFormatter plugin

Hi @Elaak,

Field formatters don't expose a render function of some kind that would be necessary to implement something like this in a clean way. You just return the HTML, it's not possible to attach event handlers to your HTML elements that would allow you to react to a click to do something like opening a popup. However you can work around by this by a global event handler and a data-attribute on your button. Then you can intercept all clicks to all buttons and trigger your action if the clicked element includes the data attribute. I answered a similar question here: Run script inside hmtl of field formatter

In your case the script wouldn't trigger an HTTP call, but render a react element using ReactDOM.render.

Let me know whether that helps!