-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
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
How to achieve consistent width of the dragged item? #619
Comments
¡Hi @Blankeos ! With css you can fix it.
|
@batnieluyo I assume I apply this I tried removing all ![]() ![]() |
Okay, I figured it out.Edit: Ignore the explanation below, I realized I'm dum and didn't see the Solution is to just: const sortable = new Sortable(_parentRef()!, {
draggable: ".sortable-item",
mirror: {
constrainDimensions: true,
},
distance: 50,
}); An older solution, if you don't want to use constrainDimensions.But it's tricky. It's not
Explanation, if it helpsI just checked the styles on this 'dragged item'. It's called a 'draggable-mirror' apparently (based on this library's terminology i guess, see the html).
I checked the styles and it boiled down to just:
So Anyway, I think it can be closed. But this seems to be very valuable FAQ tbh. |
inconisstent-width.mp4
Any way for it to not cause a weird shifting of the width here? My implementation is generally straightforward.
My implementation: Blankeos/car-finance-calculator@e0d53b1
The text was updated successfully, but these errors were encountered: