Capgemini / dcx-react-library

React Library UI/UX agnostic
https://main--6069a6f47f4b9f002171f8e1.chromatic.com
MIT License
107 stars 7 forks source link

Mulit-upload - How do I see the data in the File obj? #612

Closed Ibabalola closed 3 months ago

Ibabalola commented 3 months ago

Describe the bug How do I see the data in the File obj... where do you hide it? https://main--6069a6f47f4b9f002171f8e1.chromatic.com/?path=/docs/dcxlibrary-form-multiupload-documentation--docs

Another developer who took over this bit could also not see the array of the multi upload... it comes back as empty?

<MultiUpload
       label="Label"
        name="name"
        acceptedFormats=".doc, .pdf"
        className="file-upload"
        error={{
          text: Error,
          className: "govuk-error-message",
          id: "error-impact-assessment",
          visuallyHiddenText: {
            text: "visuallyHiddenText",
            className: "govuk-visually-hidden",
          },
        }}
        hint={{
          text: "Text",
          className: "govuk-hint",
        }}
        id="impact_assessment"
        inputProperties={{
          className: "govuk-file-upload",
        }}
        labelProperties={{
          className: "govuk-heading-m",
        }}
        multiple
        onChange={(event) => onChangeHandler("impact-assessment", event)}
/>

const onChangeHandler = (id, files) => {

   // don't see all the files?

 }
daniele-zurico commented 3 months ago

close by #613