Open udielenberg opened 4 years ago
Im working Material-UI's Tabs, Tab. and with react-swipeable-views to create swipe effects when moving between tabs My Scheduler is taking place in multiple tabs.
Tabs
Tab
react-swipeable-views
<div> <Tabs value={currentTab}> <Tab label="tab 1"/> <Tab label="tab 2"/> <Tabs> <SwipableViews index={currentTab}> <Scheduler ... /> </SwipableViews> </div>
This is my Scheudler:
1st tab works fine.
But the `Scheduler in the 2nd tab stuck, and doesnt let selecting ranges. it auto select the first slot.
While debugging I see this in ResourceEvents.js under stopDrag function:
ResourceEvents.js
stopDrag
var endTime = resourceEvents.headerItems[rightIndex - 1].end;
where rightIndex is equal to -24 (negative index)
rightIndex
-24
I think this happens because of the SwipableViews styles which push the 2nd tab to a different x,y position on the screen.
SwipableViews
x,y
Is there's a way to reset the computation of the Scheduler position, and play nice with other libs that messes with the DOM?
Context
Im working Material-UI's
Tabs
,Tab
. and withreact-swipeable-views
to create swipe effects when moving between tabs My Scheduler is taking place in multiple tabs.This is my tree structure
UI
This is my Scheudler:
Issue
1st tab works fine.
But the `Scheduler in the 2nd tab stuck, and doesnt let selecting ranges. it auto select the first slot.
While debugging I see this in
ResourceEvents.js
understopDrag
function:where
rightIndex
is equal to-24
(negative index)I think this happens because of the
SwipableViews
styles which push the 2nd tab to a differentx,y
position on the screen.Is there's a way to reset the computation of the Scheduler position, and play nice with other libs that messes with the DOM?