Hi everyone,
I’ve been started working with knime recently and wanted to create a custom node that has both searchbox as well as dropdown, for now I’d able to create a dropdown but i want to add the search functionality to it. I found a workflow which tries to explain the same but a much more information about how to actually call the external library inside the code will greatly help.
Please excuse the late response. It took me a bit to fine a good solution for you. Take a look at this component, in the generic java script view it loads an external script via hte jquery getScript funciton: Choropleth Map – KNIME Hub
// Load Google JavaScript API via jQuery getScript()
$.getScript('https://www.gstatic.com/charts/loader.js')
.done(function( script, textStatus ) {
// Load Google corechart package with drawChart() as callback function
// google.load('visualization', '1', {packages:['corechart'], callback:drawChart});
google.charts.load('46', {packages: ['corechart']});
google.charts.setOnLoadCallback(drawChart);
})
.fail(function( jqxhr, settings, exception ) {
// Inform user about failure
alert("Loading Google API failed.");
});
You can drag and drop it into your workflow, and then explore it. The code I posted is in the Generic JavaScript View node at the end of the component.