An open API service indexing awesome lists of open source software.

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

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).