Ion-item-sliding not closing

On the components example page there is a list (ItemSliding) that when slid to either direction will reveal some buttons, this works out of the box just fine, but on the example page when clicking one of those buttons it will close the currently slid open list item. This does not however work when taking the code straight from the example and into an app.

What function am I missing here that’s not stated in the docs? I just would like it to work like the example. I see the classes that it’s removing when clicked, but if it’s in the docs it should be an out of the box feature, not a custom implementation.

Any help is welcome, thanks.

All of the demos for the API documentation can be found here: https://github.com/driftyco/ionic/tree/master/demos/src

What you are interested in is the following code:

https://github.com/driftyco/ionic/blob/master/demos/src/item-sliding/page.html#L17-L51
https://github.com/driftyco/ionic/blob/master/demos/src/item-sliding/app.module.ts#L52-L65

The code used is available it just needs to be implemented. The API usage section is not meant to match the API demos exactly. It is there to show some basic usage examples and then, if added, there is a separate section for advanced usage. See the example under the close function: http://ionicframework.com/docs/v2/api/components/item/ItemSliding/#close

If you have any feedback for our documentation or demos, please create an issue here. Thanks! :slight_smile:

@brandyshea

Thank you so much, I’m sorry it was a lack of my attention to details that took up some of your time today. I should have checked github first, again thank you so much for your time.

No need for an apology. If you have ideas on how we could improve the documentation, please let me know or open an issue. We’re always interested in making things easier to find. :slight_smile:

1 Like

Will do, thank you @brandyshea :slight_smile: