Skip to content

Latest commit

 

History

History
108 lines (77 loc) · 3.02 KB

File metadata and controls

108 lines (77 loc) · 3.02 KB
title ion-reorder-group

import Props from '@ionic-internal/component-api/v8/reorder-group/props.md'; import Events from '@ionic-internal/component-api/v8/reorder-group/events.md'; import Methods from '@ionic-internal/component-api/v8/reorder-group/methods.md'; import Parts from '@ionic-internal/component-api/v8/reorder-group/parts.md'; import CustomProps from '@ionic-internal/component-api/v8/reorder-group/custom-props.mdx'; import Slots from '@ionic-internal/component-api/v8/reorder-group/slots.md';

<title>ion-reorder-group: Wrapper Component for Reorder Items</title>

import EncapsulationPill from '@components/page/api/EncapsulationPill';

The reorder group is a container for items using the reorder component. When the user drags an item and drops it, the ionReorderEnd event is dispatched. A handler for this event should be implemented that calls the complete method.

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 an index. For example usage of the reorder group, see the reorder documentation.

Interfaces

ReorderMoveEventDetail

interface ReorderMoveEventDetail {
  from: number;
  to: number;
}

ReorderEndEventDetail

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

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.

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.

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

ItemReorderEventDetail (deprecated)

Deprecated — Use the ionReorderEnd event with ReorderEndEventDetail instead.

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

ItemReorderCustomEvent (deprecated)

Deprecated — Use the ionReorderEnd event with ReorderEndCustomEvent instead.

interface ItemReorderCustomEvent extends CustomEvent {
  detail: ItemReorderEventDetail;
  target: HTMLIonReorderGroupElement;
}

Properties

Events

Methods

CSS Shadow Parts

CSS Custom Properties

Slots