Add debug function to log selected nextmatch internals

Example usage:
etemplate2.getByApplication('addressbook')[0].widgetContainer.getDOMWidgetById('nm').spillYourGuts()
This commit is contained in:
nathangray 2020-08-25 14:01:31 -06:00
parent ec77cf0ff6
commit 8cd05c571b

View File

@ -963,6 +963,36 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2
return {ids:[],all:false};
}
/**
* Log some debug information about internal values
*/
spillYourGuts()
{
let guts = function(controller)
{
console.log("Controller:",controller);
console.log("Controller indexMap:", controller._indexMap);
console.log("Grid:", controller._grid);
console.log("Selection Manager:", controller._selectionMgr);
console.log("Selection registered rows:", controller._selectionMgr._registeredRows);
if(controller && controller._children.length > 0)
{
console.groupCollapsed("Sub-grids");
let child_index = 0;
for(let child of controller._children)
{
console.groupCollapsed("Child " + (++child_index));
guts(child);
console.groupEnd();
}
console.groupEnd()
}
}
console.group("Nextmatch internals");
guts(this.controller);
console.groupEnd();
}
/**
* Event handler for when the selection changes
*