react-dropzone-uploader icon indicating copy to clipboard operation
react-dropzone-uploader copied to clipboard

Get key props error with custom component

Open anujshah108 opened this issue 4 years ago • 2 comments

const FeedbackFileUpload = () => {
  return (
    <FileUploaderDropzone>
      <FileUploaderIcon>
        <Publish />
      </FileUploaderIcon>
      <FileUploaderTitle variant="subtitle2">
        Drag and Drop Files
      </FileUploaderTitle>
      <FileUploaderBrowse variant="subtitle1">Browse Files</FileUploaderBrowse>
    </FileUploaderDropzone>
  );
};

I have this custom component that I insert into inputContent

   <Dropzone
      // disabled={Boolean(response || loading)}
        key={dropzoneKey}
        onChangeStatus={handleChangeStatus}
        submitButtonDisabled={true}
        inputContent={<FeedbackFileUpload />}
      />

I get the error:

index.js:1 Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information. at label at O (http://localhost:3000/static/js/vendors~main.chunk.js:246033:15) at div

Any help?

anujshah108 avatar Sep 27 '21 21:09 anujshah108

Thank you so much!

@all-contributors please add @AlacritousCreature for doc

shahednasser avatar Sep 23 '20 19:09 shahednasser

@shahednasser

I've put up a pull request to add @AlacritousCreature! :tada:

allcontributors[bot] avatar Sep 23 '20 19:09 allcontributors[bot]

Thank you! :D

AlacritousCreature avatar Sep 24 '20 07:09 AlacritousCreature