hi, first thanks for the component its great.
need some quick guidance/example on how to programmatically close a row that is currently open/in delete mode? how can we do that from (say) a button press callback ? wasn't sure how to do this via ref's. We are using SwipeListView and SwipeRow

hi, any tips on this would be appreciated. id be happy to update your docs also.
Hey @ajonno. There is an instance method on the <SwipeListView /> called safeCloseOpenRow.
It's not documented because it isn't really intended to be public but I think it should do what you're looking for.
onButtonPress() {
this._swipeListView.safeCloseOpenRow();
}
render () {
<SwipeListView
ref={ref => this._swipeListView = ref}
/>
}
Going to close this issue. Please reopen if this doesn't work and you're still having problems. If you'd like to add a section in the Readme please feel free to submit a PR. Thanks!
Brilliant thank you so much. I reckon this would be a great method to include in main release.
Is it possible to open a row programmatically?
@jemise111 is there a method that has an indicator whether any row is opened or not ?
Nevermind, it was super easy to accomplish.
if (null !== this._openedRowKey) {
this.closeRow(this._openedRowKey.rowMap, this._openedRowKey.rowKey)
this._openedRowKey = null;
return;
}
Hey @ajonno. There is an instance method on the
<SwipeListView />calledsafeCloseOpenRow.
It's not documented because it isn't really intended to be public but I think it should do what you're looking for.onButtonPress() { this._swipeListView.safeCloseOpenRow(); } render () { <SwipeListView ref={ref => this._swipeListView = ref} /> }Going to close this issue. Please reopen if this doesn't work and you're still having problems. If you'd like to add a section in the Readme please feel free to submit a PR. Thanks!
Thank You this is wonderful fix
Most helpful comment
Hey @ajonno. There is an instance method on the
<SwipeListView />calledsafeCloseOpenRow.It's not documented because it isn't really intended to be public but I think it should do what you're looking for.
Going to close this issue. Please reopen if this doesn't work and you're still having problems. If you'd like to add a section in the Readme please feel free to submit a PR. Thanks!