File tree 3 files changed +15
-1
lines changed
3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " LightPivotTable" ,
3
3
"author" : " ZitRo" ,
4
- "version" : " 1.2.10 " ,
4
+ "version" : " 1.2.11 " ,
5
5
"description" : " A lightweight pivot table for MDX2JSON source for InterSystems Cache" ,
6
6
"main" : " test/testServer.js" ,
7
7
"repository" : {
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ lp.updateSizes(); // recalculate pivot sizes
90
90
lp .changeBasicMDX (" ..." ); // change mdx for LPT
91
91
lp .getActualMDX (); // returns currently displayed MDX
92
92
lp .getSelectedRows (); // returns array with selected rows indexes. First row have index 1.
93
+ lp .attachTrigger (" contentRendered" , function () { }); // attaches trigger during runtime
93
94
```
94
95
95
96
#### Caché DeepSee
Original file line number Diff line number Diff line change @@ -304,6 +304,19 @@ LightPivotTable.prototype.getPivotProperty = function (path) {
304
304
return obj ;
305
305
} ;
306
306
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
+
307
320
/**
308
321
* Fill up to normal config structure to avoid additional checks and issues.
309
322
*
You can’t perform that action at this time.
0 commit comments