A Repeater component to display a list of items that can be reordered with drag and drop or keyboard navigation.

Parameters:
NameTypeDescription
propsobject

Component props.

refPropobject

Ref to the component.

Since
  • 4.7.0
Returns:

The Repeater component.

Type: 
JSX.Element

Methods

(inner) addExternalItem(event)

Add an item to the list from an external source.

Parameters:
NameTypeDescription
eventEvent

The triggering event.

Since
  • 4.7.0
Returns:

void

(inner) addItem()

Add an item to the list.

Since
  • 4.7.0
Returns:

void

(inner) deleteItem(arg)

Delete an item from the list.

Parameters:
NameTypeDescription
argstring | number | object

The ID of the item to delete, or an event object with the itemID.

Since
  • 4.7.0
Returns:

void

(inner) moveItem(originIndex, newIndex)

Moves an item within a list by a given set of positions.

Parameters:
NameTypeDescription
originIndexnumber

The original index of the item.

newIndexnumber

The new index of the item.

Since
  • 4.7.0
Returns:

void

(inner) renderEmptyState() → {JSX.Element}

Render the emptyh state UI.

Since
  • 4.7.0
Returns:

A JSX element.

Type: 
JSX.Element

(inner) renderListItem(listItem, index) → {JSX.Element|null}

Render a list item.

Parameters:
NameTypeDescription
listItemobject

List item to render.

indexnumber

Index of list item.

Since
  • 4.7.0
Returns:
Type: 
JSX.Element | null

(inner) renderRepeater(origDepth, children)

Render a Repeater as a callback.

Parameters:
NameTypeDescription
origDepthnumber

The original depth of the item.

childrenArray | boolean

The children of the item.

Since
  • 4.7.0
Returns:

void