Giter VIP home page Giter VIP logo

Comments (10)

kutlugsahin avatar kutlugsahin commented on May 18, 2024 3

Hey @ispal
It's implemented in v0.2.3.
Basically the lib looks for all the elements (starting from the containers to the root) which has scrollbars and manipulates the scroll values according to the dragging positions. This search goes on until parentElement is undefined. Since window cannot be reached by parentElement it needed a special implementation which is implemented in smooth-dnd v0.5.6.
Cheers!

from vue-smooth-dnd.

aariacarterweir avatar aariacarterweir commented on May 18, 2024 1

Hi @kutlugsahin, love this! However can you confirm that body (window) scrolling is still working? Even just testing your demo page it doesn't appear to function. (If you take overflow: auto; off the main div). I can't get it to work on my own web app, not sure if you can help?

from vue-smooth-dnd.

kutlugsahin avatar kutlugsahin commented on May 18, 2024 1

To workaround this use a scrollable div element instead of instead of body.

from vue-smooth-dnd.

isaac-souza avatar isaac-souza commented on May 18, 2024 1

To workaround this use a scrollable div element instead of instead of body.

<template>
    <div class="overflow-y-auto h-screen">
        <span>Studio Ghibli Tier List</span>
        <Container orientation="vertical" @drop="onDrop" :auto-scroll-enabled="true">
            <Draggable v-for="(item, i) in items" :key="item.id">
                <div class="w-24 h-24 bg-blue-400 m-2">
                    {{ i + 1 }} -> {{ item.data }}
                </div>
            </Draggable>
        </Container>
    </div>
</template>

Not sure if anyone is still having that issue, but as answered by @kutlugsahin, the workaround works just fine, at least it worked for me.

It is on the second line <div class="overflow-y-auto h-screen">.

Hope that helps anyone.

from vue-smooth-dnd.

kutlugsahin avatar kutlugsahin commented on May 18, 2024

@ispal
Yes, library does not support body scrolling for now. I will add this feature in upcoming versions. For now just try to put it inside a scrollable container.

from vue-smooth-dnd.

DanielQuero avatar DanielQuero commented on May 18, 2024

Hi,
I have been looking for this feature in the latest versions and it is seems to be broken after 0.2.8. The weird thing is that the demo page linked on readme is working fine, so I don't know if the demo page is an older version or I need to do something more.

from vue-smooth-dnd.

ffxsam avatar ffxsam commented on May 18, 2024

Body scrolling still doesn't work in version 0.8.1.

from vue-smooth-dnd.

yassine-y avatar yassine-y commented on May 18, 2024

Just adding to the above, it also seems that the scroll behaviour does not work when using overflow: overlay; any way to get around that?

from vue-smooth-dnd.

mkegoldberg avatar mkegoldberg commented on May 18, 2024

If it's not working, you might need to set a height value on the scrollable container.

from vue-smooth-dnd.

matur367 avatar matur367 commented on May 18, 2024

Someone will fix this ? Had a Div to scroll inside body is not a great pratice. Otherwise the library is great.

from vue-smooth-dnd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.