react-doc-viewer icon indicating copy to clipboard operation
react-doc-viewer copied to clipboard

feat: add onFetchError prop

Open siddydutta opened this issue 1 year ago • 2 comments

Fixes https://github.com/cyntler/react-doc-viewer/issues/266.

Usage:

function App() {
  const handleOnFetchError = (error) => {
    console.error("Fetch error:", error);
    // Add any custom error handling here
  };

  return (
    <div className="App">
      <DocViewer
        documents={{ uri: "https://example.com/sample.pdf" }}
        onFetchError={handleOnFetchError}
      />
    </div>
  );
}

siddydutta avatar Jul 23 '24 09:07 siddydutta

+1 to get this merged

that-one-arab avatar Oct 18 '24 09:10 that-one-arab

We use this plugin for medical purposes, so I will be very glad if you will approve this very useful feature:)

yt94kd avatar Mar 28 '25 05:03 yt94kd