gantt-task-react icon indicating copy to clipboard operation
gantt-task-react copied to clipboard

Wrong ViewMode crashing the whole web page

Open krngd2 opened this issue 2 years ago • 2 comments

While setting the basic functionality, I tried sending the ViewMode value dynamically and sent wrong values to it and it made the whole website unresponsive and crashed.

Basically sending the wrong view mode is crashing the whole webpage instead of breaking or throwing an error.

krngd2 avatar Jun 08 '22 15:06 krngd2

I also encountered this issue. I set viewMode="year" and the app crashes.

It's case sensitive, presumably because the documentation says it uses an enum behind the scenes. viewMode="Year" resolved my issue

nwoodr94 avatar Aug 18 '22 21:08 nwoodr94

You should be able to add an errorboundary which should stop the error from crashing the whole website

Error Boundary principals https://reactjs.org/docs/error-boundaries.html Typescript version https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/error_boundaries/

Graeme43 avatar Aug 21 '22 11:08 Graeme43