Coder Social home page Coder Social logo

Comments (6)

alexzhirkevich avatar alexzhirkevich commented on July 18, 2024 1

if there was a way to completely stop the sheet from sliding down when it reaches a certain deten

Unfortunately no. You can only disable it completely when it reaches some state. You can't limit swipe by minimum detent

from compose-cupertino.

alexzhirkevich avatar alexzhirkevich commented on July 18, 2024

If you want to disable swipe there is a sheetSwipeEnabled option.

If you want to allow swipe but ignore anchor changes you can return false in the confirmValueChange

confirmValueChange: (CupertinoSheetValue) -> Boolean = { true },

from compose-cupertino.

nilufer32 avatar nilufer32 commented on July 18, 2024

Won't this disable swiping the sheet completely? I want to only disable dismissing the sheet by swipe down, but I want to be able to swipe the sheet between different detents/heights

from compose-cupertino.

nadeeen1 avatar nadeeen1 commented on July 18, 2024

@alexzhirkevich Also i just tested sheetSwipeEnabled = false , using 2 detente Medium and Large and it doesn’t seem to disable swiping at all

from compose-cupertino.

alexzhirkevich avatar alexzhirkevich commented on July 18, 2024

Won't this disable swiping the sheet completely? I want to only disable dismissing the sheet by swipe down, but I want to be able to swipe the sheet between different detents/heights

Then you need to return false for the Hidden state only in confirmValueChange lambda

from compose-cupertino.

nadeeen1 avatar nadeeen1 commented on July 18, 2024

@alexzhirkevich I suppose this works, however i was wondering if there was a way to completely stop the sheet from sliding down when it reaches a certain detent. Returning false in the confirmvaluechange block will allow swiping down a bit then bouncing back to the original state, when what i’m looking for is to completely block the downward swipe gesture.
Thank you very much for taking the time to respond and for the effort you’re putting in.

from compose-cupertino.

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.