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
Hi ,
Whenever i try drag an element the element disappears and after drag finish the element appears.
Please help me. Component is excellent and perfect
You'll need to adjust the z-index to your specific use case. If in doubt, just try incrementing the value until it starts working (for instance, try z-index: 9999, or even higher)
Hmm Thanks for reply , its still not working . i have one question , the dragged mini opaque element that appear . Is it part of SortableList ? or it is is also a some popup? . because i am suspicious that react-bootstrap popup is making it self at the highest z order. But i have no way to debug
Ok This worked <SortableItem key={item-${index}} index={index} value={fieldName} style = {{zIndex: 100000}}/>
Can u please tell me why the above mentioned way worked and sortableHelper class on sortbale list didnt ?
The above applies the style directly on the element, which then gets cloned and appended to the document.body element when you start sorting (this is the sortable helper).
The above mentioned solution instead adds a class of your choice to the helper at the moment when it is cloned.
Both should work, I'd need to see some code to diagnose why the first option isn't working for you.
@Miteshdv as this element that you drag is appended at the end of the BODY, make sure you don't put the definition of .sortableHelper in the scope of some other CSS class (like you probably do with the styles for the elements) as it will simply not work.
JHanLu, travis-hilterbrand, vinaykhade and Ansalibrahimlucabezerra and Ansalibrahim
Activity
Miteshdv commentedon Nov 14, 2016
Ok the issue is my Sortable component is inside react-boostrap Modal component.
The dragged component is behind the Popup,
Can you please help me
clauderic commentedon Nov 14, 2016
You can add the
helperClass
prop to your enhancedSortableContainer
component to style the helper and give it a higher z-index value.For example:
And then in your css:
Miteshdv commentedon Nov 14, 2016
I did the same its not working :(
clauderic commentedon Nov 14, 2016
You'll need to adjust the z-index to your specific use case. If in doubt, just try incrementing the value until it starts working (for instance, try
z-index: 9999
, or even higher)Miteshdv commentedon Nov 14, 2016
Hmm Thanks for reply , its still not working . i have one question , the dragged mini opaque element that appear . Is it part of SortableList ? or it is is also a some popup? . because i am suspicious that react-bootstrap popup is making it self at the highest z order. But i have no way to debug
Miteshdv commentedon Nov 14, 2016
Ok This worked <SortableItem key={
item-${index}
} index={index} value={fieldName} style = {{zIndex: 100000}}/>Can u please tell me why the above mentioned way worked and sortableHelper class on sortbale list didnt ?
clauderic commentedon Nov 14, 2016
The above applies the style directly on the element, which then gets cloned and appended to the
document.body
element when you start sorting (this is the sortable helper).The above mentioned solution instead adds a class of your choice to the helper at the moment when it is cloned.
Both should work, I'd need to see some code to diagnose why the first option isn't working for you.
Miteshdv commentedon Nov 14, 2016
https://github.com/Miteshdv/Form-Creator/blob/master/formElementsReorder/FormReOrderView.jsx you can go to Miteshdv/form-creator on github download project npm install nd check it pls
microdou commentedon Nov 21, 2016
@Miteshdv @clauderic I had the same problem with
Popover
inreact-bootstrap
.z-index
has to be marked with!important
to override bootstrap styles.Sachem commentedon Dec 12, 2017
@Miteshdv as this element that you drag is appended at the end of the BODY, make sure you don't put the definition of .sortableHelper in the scope of some other CSS class (like you probably do with the styles for the elements) as it will simply not work.
Pyot commentedon Jul 18, 2018
For me, it works when I add to class to li tag:
and CSS
if a style of a draggable element does not satisfy you. Please make adjustment in .sortableHelper
11 remaining items