A Repeater component to display a list of items that can be reordered with drag and drop or keyboard navigation.
Parameters:
Name | Type | Description |
---|---|---|
props | object | Component props. |
refProp | object | Ref to the component. |
- Since
- 4.7.0
- Source
Returns:
The Repeater component.
- Type:
- JSX.
Element
Methods
(inner) addExternalItem(event)
Add an item to the list from an external source.
Parameters:
Name | Type | Description |
---|---|---|
event | Event | 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:
Name | Type | Description |
---|---|---|
arg | string | | 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:
Name | Type | Description |
---|---|---|
originIndex | number | The original index of the item. |
newIndex | number | The new index of the item. |
- Since
- 4.7.0
- Source
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:
Name | Type | Description |
---|---|---|
listItem | object | List item to render. |
index | number | Index of list item. |
- Since
- 4.7.0
Returns:
- Type:
- JSX.
Element |null
(inner) renderRepeater(origDepth, children)
Render a Repeater as a callback.
Parameters:
Name | Type | Description |
---|---|---|
origDepth | number | The original depth of the item. |
children | Array | | The children of the item. |
- Since
- 4.7.0
- Source
Returns:
void