Hello. I’m implementing a formatter for the sourceCodeEditor and I need to create a blur listener for the field. Is there any way to do this? I tried with the code below inserting it in the postInit but I believe it is not the correct unwrap. Thank you very much in advance.
sourceCodeEditor.unwrap(com.vaadin.ui.TextField.class).addBlurListener(e -> {
if (scriptDs.getItem().getScript() != null) {
sqlFormatter = new SqlFormatter();
scriptDs.getItem().setScript(sqlFormatter.format(scriptDs.getItem().getScript()));
}
});