Skip to content

Instantly share code, notes, and snippets.

@carlosrusso
Created July 27, 2015 18:41
Show Gist options
  • Save carlosrusso/7bc3021d729e5493e345 to your computer and use it in GitHub Desktop.
Save carlosrusso/7bc3021d729e5493e345 to your computer and use it in GitHub Desktop.
Filter component: automatically select the first element of a query
function(json){
var selectedItems = [ json.resultset[0][0] ];
this.dashboard.setParameter(this.parameter, selectedItems)
return json;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment