ContentPreview - specify version
I am using the ContentPreview component in the box-ui-elements package in a React app.
I am passing fileId into the component and would like to specify the fileVersionId to view that specific version.
const fileOptions = { "fileVersionId": "1023764078920" }
<ContentPreview
hasHeader
fileId={selectedDocument.boxFileId}
fileOptions={fileOptions}
token={token}
language={language}
messages={messages}
/>
https://github.com/box/box-content-preview lists fileVersionId as a fileOption, but I havent figured out how to use it with the react version.
-
I was close, the answer is
const fileOptions = {[selectedDocument.boxFileId]: { fileVersionId: version?.boxVersionId },};render(<ContentPreviewhasHeaderfileId={selectedDocument.boxFileId}fileOptions={fileOptions}token={token}language={language}messages={messages}/>,container);
投稿コメントは受け付けていません。
コメント
2件のコメント