csv-import icon indicating copy to clipboard operation
csv-import copied to clipboard

Adding file using "Browse Files" button is not working

Open Mahmaddz opened this issue 1 year ago • 7 comments

I used a React component with a modal. When I click on the "Browse Files" button, it doesn't load the file or work properly. How to recreate: Just install library in your project and then use the example code provided on docs.

versions: csv-import-react: ^1.0.11 react: ^18.3.1

Component code: `import { useState } from "react"; import { CSVImporter } from "csv-import-react";

const CsvImportComponent: React.FC = () => { const [isOpen, setIsOpen] = useState(false);

return ( <> <button onClick={() => setIsOpen(true)}>Open CSV Importer

  <CSVImporter
    modalIsOpen={isOpen}
    isModal={true}
    modalOnCloseTriggered={() => setIsOpen(false)}
    // darkMode={true}
    onComplete={(data) => console.log(data)}
    template={{
      columns: [
        {
          name: "First Name",
          key: "first_name",
          required: true,
          description: "The first name of the user",
          suggested_mappings: ["First", "Name"],
        },
        {
          name: "Age",
          data_type: "number",
        },
      ],
    }}
  />
</>

); };

export default CsvImportComponent;`

When i use browse files button it doesnt work. Only drag functionality if working SudeepLogisticsPvtLtd-ezgif com-video-to-gif-converter SudeepLogisticsPvtLtd-ezgif com-video-to-gif-converter (1)

Mahmaddz avatar Jun 02 '24 16:06 Mahmaddz

@Mahmaddz did you figure this out?

ansario avatar Aug 27 '24 18:08 ansario

@Mahmaddz did you figure this out?

no, i switched to another library

Mahmaddz avatar Sep 14 '24 12:09 Mahmaddz

Hey ! Is this issue still open? Can I work on it?

wannabetolkien avatar May 19 '25 23:05 wannabetolkien

@Mahmaddz did you figure this out?

no, i switched to another library

I'm looking for alternatives can you suggest any?

MohammedFaragallah avatar May 20 '25 06:05 MohammedFaragallah

Hey ! Is this issue still open? Can I work on it?

@wannabetolkien Yes! Let me know if there's anything I can help you with to get started. Feel free to make a PR.

ciminelli avatar May 20 '25 17:05 ciminelli

@Mahmaddz did you figure this out?

no, i switched to another library

I'm looking for alternatives can you suggest any?

I used this [react-csv-importer](https://www.npmjs.com/package/react-csv-importer)

Mahmaddz avatar May 21 '25 07:05 Mahmaddz

Hey ! Is this issue still open? Can I work on it?

@wannabetolkien Yes! Let me know if there's anything I can help you with to get started. Feel free to make a PR.

Thanks a lot ! I will get working on this ASAP.

wannabetolkien avatar May 21 '25 12:05 wannabetolkien