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

Scheduler not fitting parent container #3655

Closed tippfelher closed 10 months ago

tippfelher commented 1 year ago

Is there an existing issue for this?

I'm using ...

React Scheduler

Current Behaviour

According to the docs:

height | number \| auto | auto | The scheduler's height. If the value is auto, the height equals that of the container component. -- | -- | -- | --

But this doesn't work on any of your codesandboxes provided !?

How to make Scheduler fit the parent container?

Expected Behaviour

Scheduler has same height as red box in sandbox. (link below)

Steps to Reproduce

https://codesandbox.io/s/rough-water-vkdyql?file=/demo.js

Environment

Madobyte commented 1 year ago

Hello @tippfelher,

If you inspect the scheduler element, you will see that height='auto' works correctly because the scheduler element has a height of 100%. However, if you wish to make the scheduler responsive to its parent container's height, you need to implement WeekView.TimeTableCell and WeekView.TimeScaleLayout and manually define each cell's height.

I created a sample to demonstrate this solution: CodeSandbox.

A similar solution was described in the following report: Responsive Scheduler MonthView Height #2706 .

Let me know if you have additional questions.

github-actions[bot] commented 10 months ago

Thank you for using Devextreme Reactive. We use GitHub issues to track bug and feature requests. We process incoming issues as soon as possible. Issues that have been inactive for 30 days are closed. If you have an active DevExtreme license, you can contact us in our Support Center for updates. Otherwise, post your question on StackOverflow.