Giter VIP home page Giter VIP logo

Comments (11)

BogdanRad avatar BogdanRad commented on June 19, 2024

@esthor can you help me?

from react-native-swipeable-list.

BogdanRad avatar BogdanRad commented on June 19, 2024

I want to close the swipeable when i press on mute button
image

from react-native-swipeable-list.

esthor avatar esthor commented on June 19, 2024

the simplest would be to create a function that changes your list of items. So when delete is pressed, it calls a function that updates the list to no longer include that item.

from react-native-swipeable-list.

esthor avatar esthor commented on June 19, 2024

You could also use the onClose() method...but I think in the real world a "delete" or a "mute" shouldn't just be a frontend concern. You probably want to update that data at the source, so when someone reloads the app or accesses on another device, they are having the same experience. Does that answer your issue?

from react-native-swipeable-list.

esthor avatar esthor commented on June 19, 2024

I also just updated the example app with some functionality on the quick actions. You might want to check it out:

const deleteItem = itemId => {
// ! Please don't do something like this in production. Use proper state management.
const newState = [...data];
const filteredState = newState.filter(item => item.id !== itemId);
return setData(filteredState);
};

from react-native-swipeable-list.

BogdanRad avatar BogdanRad commented on June 19, 2024

Thank you @esthor

from react-native-swipeable-list.

jasenkabalac avatar jasenkabalac commented on June 19, 2024

I am having the same problem with closing the list. My data don't change after pressing the option, so I can't update the list. I am just navigating to another screen and when I return it is still open. Please help!

from react-native-swipeable-list.

esthor avatar esthor commented on June 19, 2024

Hi @jasenkabalac It sounds like all you need to do is call a function in the onPress of your Quick Action item, like instead of just navigation, the onPress function would update data & navigate? It would be easier to help if we could see your code. Could you post a link to a codesandbox or post a snippet here?

from react-native-swipeable-list.

github-actions avatar github-actions commented on June 19, 2024

This issue has not had activity for 45 days. It will be closed in 10 days if there continues to be no activity.

from react-native-swipeable-list.

esthor avatar esthor commented on June 19, 2024

I'm closing this issue. Please feel free to comment with more details or start a new issue if problems persist.

from react-native-swipeable-list.

Related Issues (8)

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.