Comments (7)
Alternatively, would it be possible for you to provide a reset API that would allow us to manually close the <SwipeableListItem>
components?
This could be very useful for users who want to leave multiple items open at once, or for those who prefer to have only one item open at a time.
from react-swipeable-list.
Hi,
Please describe it in more detail - do you mean that if user will open list item and then tries to open another one then the first one should be closed automatically?
from react-swipeable-list.
Screen.Recording.2023-04-23.at.16.38.41.mov
Like this, always open one at a time, and can be closed by clicking
from react-swipeable-list.
Hi @marekrozmus,
I've revised my comment, and now it should make more sense to understand.
from react-swipeable-list.
@edwardfxiao let me know if the fix is OK for you. Just released 1.8.0 :)
from react-swipeable-list.
@marekrozmus
Yes it worked. However, one thing that can still be improved is the ability to close the current item by clicking on it.
On 1.8.0
, Currently, if I open an item and click on it again, it does not close. Instead, it only closes when I click on a different item (which is good). Is there a way to allow the user to close an item by clicking on it again?
from react-swipeable-list.
Okay, I think there are three things that need to be improved:
1, When there is only one <SwipeableListItem>
in one <SwipeableList>
on the page, I am unable to close it by clicking on it again.
2, When there are multiple <SwipeableList>
on the page, the actions of each <SwipeableListItem>
cannot affect the others.
3, Allow the user to click anywhere else on the page to close (like the video shows)
The second issue may be outside your scope, though.
In my case
<SwipeableList>
{R.filter(i => R.prop('pinned')(i) === true)(conversations).map((item, key)=>{
return <SwipeableListItem key={key}>{item.name}</SwipeableListItem>
})}
</SwipeableList>
<SwipeableList>
{R.filter(i => R.prop('pinned')(i) === false)(conversations).map((item, key)=>{
return <SwipeableListItem key={key}>{item.name}</SwipeableListItem>
})}
</SwipeableList>
Untitled2.mov
from react-swipeable-list.
Related Issues (20)
- Action Icon not persisting HOT 5
- How to programmatically swipe any list item to reveal the trailing actions HOT 7
- Please provide option to set the speed of the animation that brings the bottom item to top when an item is deleted HOT 1
- Allow clickthrough if swipe hasn't started yet HOT 9
- Is it possible to use button list item inside SwipeableListItem? HOT 2
- _this.trailingFullSwipeAction is not a function HOT 2
- Compatibility issue with newer Chromium HOT 6
- Is it possible to track the swipe direction? HOT 4
- Delay on LeadingAction HOT 5
- Does not work with react-awesome-dnd HOT 7
- React does not recognize the x... HOT 1
- Don't work in localhost with IOS twoaction button but work in codesandbox HOT 8
- SwipeableListItem onClick action triggered, when element swiped HOT 4
- onSwipeStart only called once per element HOT 3
- Max percentage swipable HOT 4
- trailingFullSwipeAction error every time I attempt to trigger a trailing swipe HOT 1
- [Feature Request] allow to pass react fragments or insert react nodes between list items HOT 3
- maxSwipe is not optional HOT 4
- incomplete closure of swipes HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-swipeable-list.