Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cb7d2f1
chore: use dev build
brandyscarney Jun 12, 2025
4a6ee9b
docs(reorder): update onIonItemReorder -> onIonReorderEnd
brandyscarney Jun 12, 2025
e11dbd5
style: lint
brandyscarney Jun 12, 2025
10e9ab0
fix(api): update the events table to include the deprecated description
brandyscarney Jun 12, 2025
6faa3bf
docs(reorder-group): add new interfaces and deprecate old ones
brandyscarney Jun 12, 2025
f99931c
chore: latest dev build
brandyscarney Jun 12, 2025
d9c35ec
fix(api): bold deprecated and move to its own line
brandyscarney Jun 12, 2025
5166f6e
docs(reorder): ionItemReorder -> ionReorderEnd
brandyscarney Jun 12, 2025
1b3b3ca
docs(reorder): set width of existing demos to 300px
brandyscarney Jun 13, 2025
2f597e8
docs(reorder): CustomEvent<ItemReorderEventDetail> -> ReorderEndCusto…
brandyscarney Jun 13, 2025
01f0b2e
docs(reorder): rename handleReorder functions to handleReorderEnd
brandyscarney Jun 13, 2025
5f901b4
style: lint
brandyscarney Jun 13, 2025
ce444b7
docs(reorder): add reorder-start-end playground
brandyscarney Jun 13, 2025
fa1e85b
style: comments and logs
brandyscarney Jun 13, 2025
e46a45e
docs(reorder): update reorder start end to set items data
brandyscarney Jun 13, 2025
15db739
docs(reorder): add reorder move playground
brandyscarney Jun 13, 2025
dc1311f
docs(reorder): update event handling descriptions and add logs
brandyscarney Jun 13, 2025
c0a6928
docs(reorder): rename playgrounds
brandyscarney Jun 13, 2025
6fe29a3
docs(reorder): copy editing
brandyscarney Jun 23, 2025
80b3a91
docs(reorder): copy editing
brandyscarney Jun 23, 2025
7ab2e2c
chore: revert dev build
brandyscarney Jun 23, 2025
e3ec9a6
style: lint
brandyscarney Jun 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs(reorder-group): add new interfaces and deprecate old ones
  • Loading branch information
brandyscarney committed Jun 23, 2025
commit 6faa3bf9e1a571d5b6a4659179918b1a97fe44ea
52 changes: 48 additions & 4 deletions docs/api/reorder-group.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,71 @@ import Slots from '@ionic-internal/component-api/v8/reorder-group/slots.md';
import EncapsulationPill from '@components/page/api/EncapsulationPill';


The reorder group is a container for items using the [reorder](./reorder) component. When the user drags an item and drops it in a new position, the `ionReorderEnd` event is dispatched. A handler for this event should be implemented that calls the `complete` method.
The reorder group is a container for items using the [reorder](./reorder) component. When the user drags an item and drops it in the same or a new position, the `ionReorderEnd` event is dispatched. A handler for this event should be implemented that calls the `complete` method.
Comment thread
brandyscarney marked this conversation as resolved.
Outdated

The `detail` property of the `ionReorderEnd` event includes all of the relevant information about the reorder operation, including the `from` and `to` indexes. In the context of reordering, an item moves `from` an index `to` a new index. For example usage of the reorder group, see the [reorder](./reorder) documentation.
Comment thread
brandyscarney marked this conversation as resolved.
Outdated


## Interfaces

### ItemReorderEventDetail
### ReorderMoveEventDetail

```typescript
interface ItemReorderEventDetail {
interface ReorderMoveEventDetail {
from: number;
to: number;
}
```

### ReorderEndEventDetail

```typescript
interface ReorderEndEventDetail {
from: number;
to: number;
complete: (data?: boolean | any[]) => any;
}
```

### ItemReorderCustomEvent
### ReorderMoveCustomEvent

While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.

```typescript
interface ReorderMoveCustomEvent extends CustomEvent {
detail: ReorderMoveEventDetail;
target: HTMLIonReorderGroupElement;
}

```

### ReorderEndCustomEvent

While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.

```typescript
interface ReorderEndCustomEvent extends CustomEvent {
detail: ReorderEndEventDetail;
target: HTMLIonReorderGroupElement;
}
```

### ItemReorderEventDetail (deprecated)

**_Deprecated_** — Use the `ionReorderEnd` event with `ReorderEndEventDetail` instead.

```typescript
interface ItemReorderEventDetail {
from: number;
to: number;
complete: (data?: boolean | any[]) => any;
}
```

### ItemReorderCustomEvent (deprecated)

**_Deprecated_** — Use the `ionReorderEnd` event with `ReorderEndCustomEvent` instead.

```typescript
interface ItemReorderCustomEvent extends CustomEvent {
detail: ItemReorderEventDetail;
Expand Down