Hello guys, seems `set enabled` for modifier swipe...
# compose
g
Hello guys, seems
set enabled
for modifier swipeable
Copy code
Modifier.swipeable(enabled = false)
not work fine now, even set
enabled = false
SwipeableState.offset still keep changing any idea about this?
s
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/[…]wipeable.kt;l=553?q=%22fun%20%3CT%3E%20Modifier.swipeable(%22 Enabled seems to configure if it’s swipeable by user input, not that it’s not going to be swipeable at all. Offset should still change if the swipe state changes in some other way as I understand it
g
seems it still react to user's input even set enabled to false... I want to
disable swipeable
depend on some state changes, any idea how can I do it ? 🤔 @Stylianos Gakis
s
No need to ping me if I am already in the thread. I have never used the
swipeable
modifier directly myself so no I don’t know anything else than that. The docs seem to be explaining that setting that as disabled should make it so that the user can not interact with it. If this is not the case the options are: 1. I am understanding something wrong 2. You are not setting it as false or are setting false to the wrong swipeable or there is another swipeable “above” the one you’re disabling so you can still scroll despite it being off, or some other simple mistake you’re missing. 3. There’s a bug in the swipeable code. I don’t think I can help more than that unfortunately
j
To help we'd need to know more. Please post a minimal repro.