From 43297e456f437412e3bde0730578d90fa1a188e9 Mon Sep 17 00:00:00 2001 From: Miroslav Petrik Date: Fri, 1 Dec 2023 12:59:16 +0100 Subject: [PATCH] fix(ListItem): document the count child prop --- src/components/list-field/ListField.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/list-field/ListField.tsx b/src/components/list-field/ListField.tsx index 692b156..e3121c1 100644 --- a/src/components/list-field/ListField.tsx +++ b/src/components/list-field/ListField.tsx @@ -39,7 +39,14 @@ type RenderProps = Partial< export type ListItemRenderProps = RenderProp< { atom: PrimitiveAtom; + /** + * The index of the current item. + */ index: number; + /** + * Total count of items in the list. + */ + count: number; fields: Fields; add: (before?: PrimitiveAtom) => void; remove: (field: FieldAtom | FormFields) => void;