Peter,
Have error with createComponent with PivotGrid. I copied the code from the example under PivotGrid GetStarted for createComponent.
I get the following message from Typescript:
Error:(23, 9) TS2322: Type ‘{ width: number; heigth: number; theme: string; source: null; multipleSelectionEnabled: true; tre…’ is not assignable to type ‘PivotGridOptions’.
Object literal may only specify known properties, and ‘width’ does not exist in type ‘PivotGridOptions’.
After looking around jqwidgets.ts for PivotGridOptions I don’t see the definitions. I compared to GridOptions and not built out the same.
pivotGridSettings: jqwidgets.PivotGridOptions = {
width: 800,
heigth: 400,
theme: ‘energyblue’,
source: this.pivotDataSource,
multipleSelectionEnabled: true,
treeStyleRows: true,
autoResize: false,
};
When I said it was working before I did something that worked but, not what you had recommended above. The following code works if I place in the
Angular Lifecycle ngAfterViewInit(). Clearly not what you recommended. :))
ngAfterViewInit(): void {
this.pivotGrid1.setOptions({
theme: ‘energyblue’
});
}
Regards,
Gary