I am trying to handle React components in popup outer windows, I am using FlexLayout, ag-Grid React and SyncFusion React and I managed to handle the outer window with FlexLayout by using const currentDocument = this.selfRef.current.ownerDocument;
-check Floating Tabs (Popouts) in FlexLayout- and pass this currentDocument
to getDocument()
callback in ag-Grid and now I wanted to do the same with SyncFusion, but I found no method/property in SyncFusion to pass the currentDocument
to it.
So, is there anyway to pass the outer window document to the SyncFusion component which will be re-rendered after going in outer window and leave the origin document?
Attached a screenshot for the issue when not passing the currentDocument
(new outer window) to SyncFusion components I have pressed the Date Picker button in the outer window (on the right), but the DatePicker component rendered in the original window (on the left)!
You can align the popup position relate to input element by setting X and Y position in the open event of DateTimePicker popup as mentioned in the below code example.
The possible values for popup position are left, right, top and bottom. Try specifying the all possible combination of values to align the popup based on your viewport.
Also, you can set the offsetX and offsetY value in number (Provide the x and y value by imaging x and y axis) to align the DateTimePicker popup relate to the input element. Here, we have provided the offsetX and offsetY value based on the desktop mode. You can customize it based on the view port.
Sample Link: https://stackblitz.com/edit/react-yhgq4y-w2avy2?file=index.js
Provide more details about your query, if the solution suggested above does not help you.