We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const App = () => { const contentRef = useRef() //................. const config = { schedulerWidth: '90%', responsiveByParent: true, views: [ { viewName: 'Year', viewType: ViewType.Year, showAgenda: false, isEventPerspective: false } ] } return ( <Content ref={contentRef} style={{margin: '24px 16px', padding: 24, minHeight: 280, background: colorBgContainer }}> <SimpleScheduler parentRef={contentRef} config={config} resources={resources} events={events} viewType={ViewType.Year}/> </Content> ) }; const SimpleScheduler = (props) => { // ....... return ( <Scheduler parentRef={props.parentRef} schedulerData={schedulerData} prevClick={prevClick} nextClick={nextClick} onSelectDate={onSelectDate} onViewChange={onViewChange}/> ) }
Result: Scheduler does not adapt to the width of the parent component。
The text was updated successfully, but these errors were encountered:
Ive got the same issue, it wont conform to the outside parent div.
I have applied useRef for parentRef, but that was not fruitful either.
let schedulerData = new SchedulerData( date, ViewType.Day, // Change the status of daily, weekly or monthly false, false, // Switch Resources and task name area { responsiveByParent: true, startResizable: false, endResizable: false, schedulerContentHeight: "100%", weekResourceTableWidth: 160, weekCellWidth: 80, // minuteStep: 15 } ); const schedulerParentRef = useRef(); const [viewModel, setViewModel] = useState(schedulerData); <div className="w-full" ref={schedulerParentRef}> <div className="-mt-4" style={{ marginLeft: "auto" }}> <Scheduler parentRef={schedulerParentRef} schedulerData={viewModel} prevClick={prevClick} nextClick={nextClick} onSelectDate={onSelectDate} onViewChange={onViewChange} eventItemClick={eventClicked} viewEventClick={ops1} viewEventText="Details" /> </div> </div>
It was referenced here on how to use it, but its not exactly for function based components.
StephenChou1017#260
Plus it seems that its more often used in class based components than function-based ones, that should still not be the cause right?
Sorry, something went wrong.
No branches or pull requests
Result: Scheduler does not adapt to the width of the parent component。

The text was updated successfully, but these errors were encountered: