🐛 Multiple documents working
This commit is contained in:
parent
892c019836
commit
2ef60815a9
@ -235,20 +235,32 @@ class ViewDocumentsClass extends BasePage<IPropsClass, IState> {
|
||||
private goToPrevious() {
|
||||
const index = this.state.selectedFileIndex - 1;
|
||||
if (this.hasPrevious()) {
|
||||
this.setState({
|
||||
this.setState(
|
||||
{
|
||||
selectedFile: this.state.document!.files![index]!,
|
||||
selectedFileIndex: index,
|
||||
});
|
||||
fileBlob: null,
|
||||
},
|
||||
() => {
|
||||
this.getFilePreview();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private goToNext() {
|
||||
if (this.hasNext()) {
|
||||
const index = this.state.selectedFileIndex + 1;
|
||||
this.setState({
|
||||
this.setState(
|
||||
{
|
||||
selectedFile: this.state.document!.files![index]!,
|
||||
selectedFileIndex: index,
|
||||
});
|
||||
fileBlob: null,
|
||||
},
|
||||
() => {
|
||||
this.getFilePreview();
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user