Giter Club home page Giter Club logo

Comments (7)

edwardfxiao avatar edwardfxiao commented on May 27, 2024 1

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.

marekrozmus avatar marekrozmus commented on May 27, 2024

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.

edwardfxiao avatar edwardfxiao commented on May 27, 2024
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.

edwardfxiao avatar edwardfxiao commented on May 27, 2024

Hi @marekrozmus,
I've revised my comment, and now it should make more sense to understand.

from react-swipeable-list.

marekrozmus avatar marekrozmus commented on May 27, 2024

@edwardfxiao let me know if the fix is OK for you. Just released 1.8.0 :)

from react-swipeable-list.

edwardfxiao avatar edwardfxiao commented on May 27, 2024

@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.

edwardfxiao avatar edwardfxiao commented on May 27, 2024

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)

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.