cyntler / react-doc-viewer

File viewer for React.
https://cyntler.github.io/react-doc-viewer
Apache License 2.0
341 stars 120 forks source link

LoadingRenderer not being used #199

Open barrychapman opened 9 months ago

barrychapman commented 9 months ago

I am using an overridden loading renderer, but it does not seem to be getting used?

const LoadingRenderer: ILoadingRendererConfig = ({document, fileName}) => {
    const fileText = fileName || document?.fileType || "";
              console.log(document);
    return (
        <><Loading style={"bars"}/></>
    );

}

It is called here:

            <Row>
                <Col>
                    <DocViewer pluginRenderers={DocViewerRenderers} config={{loadingRenderer: { overrideComponent: LoadingRenderer }, header:{  overrideComponent: Header, disableHeader: false}}} documents={[{uri: fileDataUri, fileName: document.d}]} />
                </Col>
            </Row>

But the loading message on the viewer still says 'Loading...'

barrychapman commented 8 months ago

@cyntler - will this be patched in a coming release?

cyntler commented 8 months ago

@barrychapman Yes! I will try to fix it. I have very little time lately, that's why work on the library is going slower.

techversatile2020 commented 4 months ago

hello cyntler is there any way to display subtitle file like vtt or srt text in this library