File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " LightPivotTable" ,
33 "author" : " ZitRo" ,
4- "version" : " 1.2.10 " ,
4+ "version" : " 1.2.11 " ,
55 "description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
66 "main" : " test/testServer.js" ,
77 "repository" : {
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ lp.updateSizes(); // recalculate pivot sizes
9090lp .changeBasicMDX (" ..." ); // change mdx for LPT
9191lp .getActualMDX (); // returns currently displayed MDX
9292lp .getSelectedRows (); // returns array with selected rows indexes. First row have index 1.
93+ lp .attachTrigger (" contentRendered" , function () { }); // attaches trigger during runtime
9394```
9495
9596#### Caché DeepSee
Original file line number Diff line number Diff line change @@ -304,6 +304,19 @@ LightPivotTable.prototype.getPivotProperty = function (path) {
304304 return obj ;
305305} ;
306306
307+ /**
308+ * Attaches the trigger during the runtime.
309+ * @param {string } triggerName
310+ * @param {function } trigger
311+ */
312+ LightPivotTable . prototype . attachTrigger = function ( triggerName , trigger ) {
313+ if ( typeof trigger !== "function" ) {
314+ console . warn ( "LPT.addTrigger: pass the trigger as a second argument." ) ;
315+ return ;
316+ }
317+ this . CONFIG . triggers [ triggerName ] = trigger ;
318+ } ;
319+
307320/**
308321 * Fill up to normal config structure to avoid additional checks and issues.
309322 *
You can’t perform that action at this time.
0 commit comments