Skip to content

Missing keys on iterators #73

@apennell

Description

@apennell

Version: ^0.4.2

Steps to Reproduce

View a PDF with multiple pages
Look at JS console in browser

Expected Behavior

Keys on all iterators so that there are no warnings

Actual Behavior

Warning in console:

warning.js?6327:33 Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `t`. See https://fb.me/react-warning-keys for more information.
    in t (created by t)
    in t (created by t)
    in div (created by t)
    in div (created by t)
    in t (created by EvidencePreviewModal)

I tracked this line 117 in pdf-viewer.jsx, although it may be happening in other file type components as well. A key needs to be added here within <PDFPage />: key={`page-${index}`}. I don't have time at the moment to do it, but if you're open to PR's I may be able to get to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions