search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

TypeError: Cannot set properties of undefined (setting 'cssClass')

Asked by Anonymous
1 year ago.
Hi,
After updating from version 2022.2.5272 to 2022.2.5332 I'm getting this error
logging.service.ts:11 
        
       TypeError: Cannot set properties of undefined (setting 'cssClass')
    at DayPilot.Scheduler.onBeforeRowHeaderRender (time-reporting-board.component.ts:677:7)
    at DayPilot.Scheduler.yn (daypilot-pro-angular.mjs:8758:250)
    at DayPilot.Scheduler.jo (daypilot-pro-angular.mjs:7981:34)
    at DayPilot.Scheduler.Dk (daypilot-pro-angular.mjs:7922:51)
    at DayPilot.Scheduler.fj (daypilot-pro-angular.mjs:9782:399)
    at DayPilot.Scheduler.Nc (daypilot-pro-angular.mjs:6498:154)
    at _.doit (daypilot-pro-angular.mjs:6509:432)
    at _.request (daypilot-pro-angular.mjs:6505:185)
    at DayPilot.Scheduler.update (daypilot-pro-angular.mjs:6503:199)
    at DayPilotSchedulerComponent.ngDoCheck (daypilot-pro-angular.mjs:11034:26)

The property cssClass seems to be undefined as shown in the attached image. I never experienced this error before.

Answer posted by Dan Letecky [DayPilot]
1 year ago.

This error means that the parent object of the cssClass property is undefined - args.columns[x].

Since version 2022.2.5302, the columns are merged by default for parent resources. That means args.columns is empty in onBeforeRowHeaderRender.

https://javascript.daypilot.org/daypilot-pro-for-javascript-2022-2-5302/

You can revert to the previous behavior by adding:

rowHeaderColumnsMergeParents: false

to the config.

Comment posted by Anonymous
1 year ago.

Thank you for you answer. I'm happy, that I can revert it so simple.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.