You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my original application, I have multiple complex components displayed in a list. Each component is different and quite intricate. Additionally, every specific component consists of many nested components, and the CSS is somewhat complex.
When an element is partially out of view due to the scroll position and I initiate a drag action at that moment, a bug occurs where the dragged element also includes the border from the component below it, as shown in the attached image.
I know that this issue can be avoided using React Portal and the setCustomNativeDragPreview method as discussed in documentation. However, I only know how to apply this solution when dealing with a single unique simple component with very little styles applied. In my case, I have a Wrapper component that receives complex a specific child component as a prop and assigns it the ability to be draggable.
So, my question is: how can I ensure that any component received as a prop in the Wrapper component, regardless of its complexity, is rendered identically using React Portal? Or, if there is another way to solve this issue, I would appreciate any suggestions.
The text was updated successfully, but these errors were encountered:
In my original application, I have multiple complex components displayed in a list. Each component is different and quite intricate. Additionally, every specific component consists of many nested components, and the CSS is somewhat complex.
When an element is partially out of view due to the scroll position and I initiate a drag action at that moment, a bug occurs where the dragged element also includes the border from the component below it, as shown in the attached image.
Code Example can be found here
I know that this issue can be avoided using React Portal and the setCustomNativeDragPreview method as discussed in documentation. However, I only know how to apply this solution when dealing with a single unique simple component with very little styles applied. In my case, I have a Wrapper component that receives complex a specific child component as a prop and assigns it the ability to be draggable.
So, my question is: how can I ensure that any component received as a prop in the Wrapper component, regardless of its complexity, is rendered identically using React Portal? Or, if there is another way to solve this issue, I would appreciate any suggestions.
The text was updated successfully, but these errors were encountered: