2

I'm trying to add a parameter to a DevExtreme SelectBox Datasource. I'm trying to use the solution suggested by DevExtreme here supportcenter.devexpress.com like this:

<script>
function onGroupValueChanged(e) {
    let kpiSelectBox = $("#kpiSelectBox").dxSelectBox("instance");
    let dataSource = kpiSelectBox.getDataSource();
    dataSource.LoadParams(new { dataGroupId = new JS("function() { return e.value; }") })
    dataSource.load();
}
</script>

But I get an error:

Uncaught SyntaxError: Invalid shorthand property initializer

Anyone know how to do this?

Mike
  • 21
  • 4

0 Answers0