philipphecht / react-native-doc-viewer

React Native Doc Viewer (Supports file formats: xls,ppt,doc,xlsx,pptx,csv,docx,png,jpg,pdf,xml,binary ...)
MIT License
94 stars 116 forks source link

[iOS] fileNameOptional doesn't work in top header when open file for docx file #158

Open jiandian opened 4 years ago

jiandian commented 4 years ago

when I open a PDF file, the top title is the file name that I passed in, and then open a Docx file, the top title is still the file name of PDF file, but in the Shared module, that name is correct. After many attempts, I found that when I opened the Docx file, there would be such a problem that the title would always be the title of the last open file's fileNameOptional.

menga33 commented 4 years ago

// var SavePath = Platform.OS === 'ios' ? RNFS.MainBundlePath : RNFS.DocumentDirectoryPath; var SavePath = RNFS.DocumentDirectoryPath;