Uniforms: Embedding List Field Inside Accordion - What to use as eventKey?

Hi,

Sorry, this isn’t really specifically related to meteor, it’s more of a question around using uniforms.

I have (somewhat horribly) embedded my List Field inside an accordion.

However, I’m struggling to figure out what to use as the Accordion eventKeys.

The code is below. It’s currently still using the default “0” as the eventKey. Normally I would use an accordion when iterating an array and using the id of each array item. However, in a form like this, I’m not entirely sure what I can do to ensure each ListItemField eventKey is unique?

The accordion code is below. I’m happy to give more information if required.

<Accordion>
      <Card>
        <ListField
          name="customOptionGroups"
          addIcon={<Add text="Group" />}
          showInlineError
          className="list-field p-1 pl-3 pb-3 border-0"
        >
            <ListItemField name="$">
              <Container fluid className="mx-0">

                <Card.Header className="p-0 border">
                  <Row className="mx-0 d-flex align-items-center">
                    <AccordionToggle eventKey="0">Expand</AccordionToggle>
                    <Col xs={4}>
                      <TextField name="name" label={false} placeholder="Group Name" className="mb-0" />
                    </Col>
                    <ListDelField removeIcon={<Delete text="Group" />} className="ml-auto" />
                  </Row>
                </Card.Header>

                <Accordion.Collapse eventKey="0" className="border border-top-0">
                  <Container className="mx-0">
                    <Row>
                      <Col xs={3} className="border-right">
                        <Row className="my-2">
                          <Col>
                            <span>Limits</span>
                          </Col>
                        </Row>
                        <Row>
                          <Col>
                            <NumField name="max" label={false} placeholder="Max" className="mb-2" />
                          </Col>
                        </Row>
                        <Row>
                          <Col>
                            <NumField name="min" label={false} placeholder="Min" className="mb-2" />
                          </Col>
                        </Row>
                      </Col>
                      <Col xs={9}>
                        <Options />
                      </Col>
                    </Row>
                  </Container>  
                </Accordion.Collapse>
                
              </Container>              
            </ListItemField>
        </ListField>
      </Card>
    </Accordion>    

Thanks,
Alex