Git Product home page Git Product logo

Comments (6)

jemise111 avatar jemise111 commented on June 16, 2024

Hey @Haiwen01, thanks for reporting. I'll take a look asap but would you be able to post the code you're using to render the SwipeList and remove an item? It'd be a big help. Thanks!

from react-native-swipe-list-view.

jemise111 avatar jemise111 commented on June 16, 2024

@Haiwen01 good call on the openCellId, fixed this in #12.

Closing this. Let me know if you have any other issues. Thanks!

from react-native-swipe-list-view.

thorbenandresen avatar thorbenandresen commented on June 16, 2024

Hi Jesse,

I still have this problem in my list with sections.

cannot read property 'closeRow' of null (if debugger attached)
null is not an object (evaluating 'rowMap["+secId+rowId].closeRow") (if no debugger attached)

<TouchableOpacity style={[styles.backRightBtn, styles.backRightBtnLeft]}
            //onPress={ ()=> this._delete(rowData)}
                            onPress={ _ => {
                                onDelete(rowData)
                                rowMap[`${secId}${rowId}`].closeRow() 
                                    }}
                                    >               
                                <Text style={styles.backTextWhite}>Delete</Text>
                            </TouchableOpacity>

Thanks!

from react-native-swipe-list-view.

jemise111 avatar jemise111 commented on June 16, 2024

@thorbenandresen I believe that's happening because I'm guessing your onDelete function removes that index from the dataSource before you tried to close it. If you reversed the order of deleting and closing I don't think you'd have a problem.

In any case I've released an update that safe checks against trying to close a row that no longer exists so if you npm install the latest (0.1.1) you shouldn't have a problem either way. Let me know if you do, thanks!

from react-native-swipe-list-view.

thorbenandresen avatar thorbenandresen commented on June 16, 2024

@jemise111 again, thank you very much! I really appreciate the effort you put into this. Of all the RN swipeout modules out there, this the most elegant one and the first one which works well for me. Keep up the good work!

from react-native-swipe-list-view.

liamse avatar liamse commented on June 16, 2024

I have same problem. Add rowMap[`${secId}${rowId}`].closeRow() in deleteRow function solve it for me.
The point is you need to closeRow before delete it.

from react-native-swipe-list-view.

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.