Skip to content

Instantly share code, notes, and snippets.

@simcen
Created October 21, 2015 08:16
Show Gist options
  • Select an option

  • Save simcen/12d4b23d8b509c000f73 to your computer and use it in GitHub Desktop.

Select an option

Save simcen/12d4b23d8b509c000f73 to your computer and use it in GitHub Desktop.
require.config({
paths: {
"app": "../app"
}
});
require([
"splunkjs/mvc",
"splunkjs/mvc/utils",
"splunkjs/mvc/tokenutils",
"underscore",
"jquery"
], function(
mvc,
utils,
TokenUtils,
_,
$
) {
var submittedTokens = mvc.Components.getInstance('submitted', {create: true});
var defaultTokens = mvc.Components.getInstance('default', {create: true});
defaultTokens.on("change:nr_rows", function(new_nr_rows, nr_rows, options) {
mvc.Components.get('sample_table').getVisualization(function(tableView){
tableView.metadata.set({ pageSize: nr_rows });
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment