Anybody know if it is possible to set a data view component’s data source to a javascript array generated outside of dmx?
Without going into all the reasons leading up to this, it would sure be handy to be able to set the source of a data view from javascript. I’m using a custom formatter currently which works, but the formatter constantly runs in the background. The formatter either calls a filtering routine when needed, or just returns the already filtered array.
v6.8 and dmx.Component.setData no longer seems to be a function. What’s the correct way now to set the data of a data view from JS?
// Don't search for very short or empty strings
if (searchTerm.length < 2) {
document.getElementById('dvSearchResults').dmxComponent.setData([]); // Clear results
return;
}
And the error from console:
Uncaught TypeError: document.getElementById(...).dmxComponent.setData is not a function