equinor / mad

Experimental monorepo for the Mobile Application Delivery team

Home Page:https://equinor.github.io/mad/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

As a developer, I would like to close the cell swipe group once a button is clicked

Chibuzor-Nwemambu opened this issue · comments

Package / App

MAD Components

Description

image

In workorders, when the user presses "Add bookmark", I would like the swipe group to close. It seems like this is not currently possible

Alternatives

No response

Other info

No response

@HaakonSvane @Sandtory Do you know if this is currently possible, or do we need to make some adjustments to @equinor/mad-components?

Think we need to make some adjustments, yeah. We use react-native-gesture-handler's Swipable, and I think it supports something like this, but we probably should expose that functionality somehow

Seems we can close the swipable using a ref, but we need a nice way to do this when we have lists of swipable cells. Maybe include an optional swipableRef in the onPress prop of BaseCellSwipeItemProps? This way, the user can at least access the Swipable ref methods inside the onPress callback

Sounds good! @tormodAase will have a look at this today!