Slide to Remove Plugin for Sencha Touch Lists
SlideToRemove is a simple plugin for Sencha Touch 2 that adds the ability to swipe list items to remove them upon confirmation, very similiar to the native iOS controls seen on iPhones/iPads.
Currently supports Sencha Touch 2.1 & 2.2
Make sure you use the file for the correct version until they can be combined!
Usage Notes:
- Add this plugin to any list.
- User can now swipe the list item to display delete button, and swipe it back to hide the delete button. Multiple delete buttons can be open at one time.
- Set removeText in plugin configuration to change text on the delete button, and buttonWidth to change the width of the button.
- Easily change the button configuration manually in this plugin for advanced customization.
- By default the handler for the button will remove the record from the store.
- The closeDeletes method will close all open delete buttons.
Usage Example:
Ext.create('Ext.List', { store: 'Bookmarks', plugins: { xclass: 'Ext.plugin.SlideToRemove', buttonWidth: '40%', removeText: 'Remove' }, itemTpl: new Ext.XTemplate( '{Title}' ) });