jemise111 / react-native-swipe-list-view

A React Native ListView component with rows that swipe open and closed
https://www.npmjs.com/package/react-native-swipe-list-view
MIT License
2.79k stars 527 forks source link

how to reset previouslyOpenedRowKey... #500

Closed salmanitb closed 3 years ago

salmanitb commented 4 years ago

Your issue may already be reported! Please search on the issue tracker before creating one.

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

salmanitb commented 4 years ago

@jemise111 i have 3 button.. button1 , button 2 and button 3.. and i have react native swipe list view. if i click button 1,button2 or button 3 just change the data.

the problem is if i open swipe in one item(button 1) if i click button 2, automatic item open in the same one posisition in previousopenedrowkey.

this is my function to open and close manually

bukatutup = (rowMap, rowKey) => { let row = rowMap[rowKey]; if (rowIsOpen) { if (rowKey === previouslyOpenedRowKey) { row.closeRow(); rowIsOpen = false; previouslyOpenedRowKey = null; } else { let previouslyOpenedRow = rowMap[previouslyOpenedRowKey]; previouslyOpenedRow.closeRow(); row.manuallySwipeRow(normalize(-160)); rowIsOpen = true; previouslyOpenedRowKey = rowKey; } } else { row.manuallySwipeRow(normalize(-160)); rowIsOpen = true; previouslyOpenedRowKey = rowKey; } };

"react-native-swipe-list-view": "^2.1.3", "react-native": "^0.61.5",

please help me..

salmanitb commented 4 years ago

i want if i click button2, my swipe is reset..

jemise111 commented 4 years ago

Hey @salmanitb I'm sorry but I'm not fully understanding the question. Do you think you could post a gif of the problem? Happy to take another look then, thanks!

(apologies for the delay in responding)

jemise111 commented 3 years ago

Closing as inactive