You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After saving the pivot configuration with any of the SubTotal.js renderers to cookie and trying to restore an error is produced.
Specifically line 567 in subtotal.js (val = totalAggregator.value();)
error message: Cannot read property 'value' of undefined
The following JSON is what is being saved and attempting to be reloaded.
{"rendererOptions":{"localeStrings":{"renderError":"An error occurred rendering the PivotTable results.","computeError":"An error occurred computing the PivotTable results.","uiRenderError":"An error occurred rendering the PivotTable UI.","selectAll":"Select All","selectNone":"Select None","tooMany":"(too many to list)","filterResults":"Filter values","apply":"Apply","cancel":"Cancel","totals":"Totals","vs":"vs","by":"by"},"table":{}},"localeStrings":{"renderError":"An error occurred rendering the PivotTable results.","computeError":"An error occurred computing the PivotTable results.","uiRenderError":"An error occurred rendering the PivotTable UI.","selectAll":"Select All","selectNone":"Select None","tooMany":"(too many to list)","filterResults":"Filter values","apply":"Apply","cancel":"Cancel","totals":"Totals","vs":"vs","by":"by"},"derivedAttributes":{},"hiddenAttributes":[],"hiddenFromAggregators":[],"hiddenFromDragDrop":[],"menuLimit":9999,"cols":[],"rows":["READY_STATUS"],"vals":[],"rowOrder":"key_a_to_z","colOrder":"key_a_to_z","exclusions":{},"inclusions":{},"unusedAttrsVertical":85,"autoSortUnusedAttrs":false,"showUI":true,"sorters":{},"rendererName":"Table With Subtotal Heatmap","inclusionsInfo":{},"aggregatorName":"Count"}
As mentioned earlier, all of the standard PivotJS renderers still save/restore perfectly, it's just the new subtotal renderers that seem to have the issue.
The text was updated successfully, but these errors were encountered:
made a comment re this on another thread - subtotal is using aggregate values already made by the main code, they are not currently being remade on refresh, hence they are undefined when using onrefresh - somehow subtotal has to remake a table-version of the aggregators first, then apply the subtotal styling after that...
Another issue I found is that some of my source values had decimal places, converting them to integers allowed the subtotal view to render correctly the first time.
OK think I worked out what was stopping it, I need to add the 'dataClass' back to the config object on refresh:
var dataClass = $.pivotUtilities.SubtotalPivotData;
and then later in onrefresh:
configobject["dataClass"] = dataClass;
Without that, the default dataClass was being created on refresh, which didn't have the Subtotal figures in it.
jacooloff
added a commit
to jacooloff/subtotal
that referenced
this issue
Jan 13, 2022
After saving the pivot configuration with any of the SubTotal.js renderers to cookie and trying to restore an error is produced.
Specifically line 567 in subtotal.js (val = totalAggregator.value();)
error message: Cannot read property 'value' of undefined
The following JSON is what is being saved and attempting to be reloaded.
{"rendererOptions":{"localeStrings":{"renderError":"An error occurred rendering the PivotTable results.","computeError":"An error occurred computing the PivotTable results.","uiRenderError":"An error occurred rendering the PivotTable UI.","selectAll":"Select All","selectNone":"Select None","tooMany":"(too many to list)","filterResults":"Filter values","apply":"Apply","cancel":"Cancel","totals":"Totals","vs":"vs","by":"by"},"table":{}},"localeStrings":{"renderError":"An error occurred rendering the PivotTable results.","computeError":"An error occurred computing the PivotTable results.","uiRenderError":"An error occurred rendering the PivotTable UI.","selectAll":"Select All","selectNone":"Select None","tooMany":"(too many to list)","filterResults":"Filter values","apply":"Apply","cancel":"Cancel","totals":"Totals","vs":"vs","by":"by"},"derivedAttributes":{},"hiddenAttributes":[],"hiddenFromAggregators":[],"hiddenFromDragDrop":[],"menuLimit":9999,"cols":[],"rows":["READY_STATUS"],"vals":[],"rowOrder":"key_a_to_z","colOrder":"key_a_to_z","exclusions":{},"inclusions":{},"unusedAttrsVertical":85,"autoSortUnusedAttrs":false,"showUI":true,"sorters":{},"rendererName":"Table With Subtotal Heatmap","inclusionsInfo":{},"aggregatorName":"Count"}
As mentioned earlier, all of the standard PivotJS renderers still save/restore perfectly, it's just the new subtotal renderers that seem to have the issue.
The text was updated successfully, but these errors were encountered: