-
Notifications
You must be signed in to change notification settings - Fork 20
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
Button component in content prop #165
Comments
I assume you want to achieve the iphone functionality like showing few buttons after swipe? It looks like you can so far do the thing you've mentioned above with the Let me know if this is needed and try if you can achieve the behavior you need with the |
@all-contributors please add @ziabskiK for bug |
I've put up a pull request to add @ziabskiK! 🎉 |
We have checked this issue and current architecture does not allow this. We will monitor this issue and get back to you if more users will be interested in such a feature. Most probably, a huge rewrite is needed to support your request as the inner node layout and positioning is pretty complicated. |
well i searched everywhere for that functionality that you mention , when you swipe it reveals the content behind and stays like that for you to click on a button, like here , i don't want to use react-native-web just for that |
Hi, I'll try to make another try hopefully this weekend. Will let you know. 🙂 |
I would also love to see this feature. We're trying to mimic the behavior of a native swipeable iOS listview as much as possible, but this would require buttons that are revealed if you just swipe a bit (but not beyond a certain threshold). react-swipe-to-delete-ios supports this, but it has other issues (like rubber-banding of the enclosing web-page). |
@derwaldgeist, @Ex0-Ghost Please check this one and leave some comments there :) I have reimplemented all from scratch so still might have some issues. |
How is it possible to trigger onClick function on button which is located as a content of swipe element?
Any tip how to achieve this?
Thanks in advance.
Edit Code:
{({ className, ...rest }) => (
<SwipeableListItem key={id}
swipeLeft={{
content: <Button startIcon={} className={classes.addToCartBtn}
onClick={e => {
e.stopPropagation();
console.log('Test function call');
}}>
Add to cart
,
actionAnimation: ActionAnimations.NONE
}}
{...rest}>
///items
))}
The text was updated successfully, but these errors were encountered: