DevExpress / devextreme-reactive

Business React components for Bootstrap and Material-UI
https://devexpress.github.io/devextreme-reactive/
Other
2.07k stars 376 forks source link

TypeError: Cannot read properties of undefined (reading 'parent') #3626

Closed mfaheemakhtar closed 1 year ago

mfaheemakhtar commented 1 year ago

Is there an existing issue for this?

I'm using ...

React Scheduler

Current Behaviour

I am trying to use the custom plugin from #2820 but the scheduler is crashing with this error.

image

the item array has no elements and reading item[0] is causing the issue.

It seems to work correctly on the code sandbox. What might be the issue on my end?

Expected Behaviour

Should not crash.

Steps to Reproduce

No steps.

Works without the issue on sandbox: https://codesandbox.io/s/devextreme-react-scheduler-for-material-ui-forked-tu6csf?file=/index.js

Environment

mfaheemakhtar commented 1 year ago

Update: Changing cellDuration to 30 stopped crashing it. Not sure if it is just random or really works

Update: Not working.

<WeekView
  startDayHour={0}
  endDayHour={24}
  cellDuration={30}
 />