https://github.com/kunder-lab/ionic-list-draggable-item
Custom implementation of ionic list to support draggable items without pressing "order" button
https://github.com/kunder-lab/ionic-list-draggable-item
Last synced: 20 days ago
JSON representation
Custom implementation of ionic list to support draggable items without pressing "order" button
- Host: GitHub
- URL: https://github.com/kunder-lab/ionic-list-draggable-item
- Owner: kunder-lab
- License: mit
- Created: 2016-02-26T14:08:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-26T15:32:30.000Z (about 9 years ago)
- Last Synced: 2025-03-09T06:54:16.964Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://www.kunder.cl
- Size: 14.6 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# ionic-list-draggable-item
Custom implementation of ionic list to support draggable items without pressing "order" button## Installation
To install latest version:
```Shell
bower install ionic-list-draggable-item
```## Usage
It's used as ``.
Just add `` directive and add some `` inside.Now, your items will be draggable holding them or pressing the "order" button.
## Example
You can see a full example at samples folder.
```html
Item {{ item.id }}
Edit
Share
```
## API
### Directive: list-draggable-item
This list can include content ranging from basic text all the way to buttons, toggles, icons, and thumbnails as you wuld do with any ion-list.
Both the list, which contains items, and the list items themselves can be any HTML element. The containing element requires the list class and each list item requires the item class.
As ion-list, this list also supports swipe to edit, drag to reorder and removing items.
For more information, you can checkout ionList [documentation](http://ionicframework.com/docs/api/directive/ionList/)
#### Supported attributes
| Attr | Type | Details |
| ---- | ---- | ------- |
| show-delete (optional) | `boolean` | Whether the delete buttons for the items in the list are currently shown or hidden. |
| show-reorder (optional) | `boolean` | Whether the reorder buttons for the items in the list are currently shown or hidden. |
| can-swipe (optional) | `boolean` | Whether the items in the list are allowed to be swiped to reveal option buttons. Default: true. |### Controller: ionicListDraggableItemController
Refer to $ionicListDelegate [documentation](http://ionicframework.com/docs/api/service/$ionicListDelegate/). The directive's controller exposes the same methods as the ion-list's controller.
## Bugs or comments?
Report it at the [issues section](https://github.com/kunder-lab/ionic-list-draggable-item/issues).