fix: Don't show save file to disk when UIOptions.canvasActions.export.saveFileToDisk is false (#4073)

This commit is contained in:
Aakansha Doshi 2021-10-19 14:39:47 +05:30 committed by GitHub
parent 571be9c0fe
commit bc88cf5002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,8 @@ Please add the latest change on the top under the correct section.
### Fixes
- Don't show save file to disk button in export dialog when `saveFileToDisk` passed as `false` in [`UIOptions.canvasActions.export`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#exportOpts).
- [`onPaste`](https://github.com/excalidraw/excalidraw/blob/master/src/packages/excalidraw/README.md#onPaste) prop should return false to prevent the native excalidraw paste action [#3974](https://github.com/excalidraw/excalidraw/pull/3974).
#### BREAKING CHANGE

View File

@ -47,7 +47,7 @@ const Excalidraw = (props: ExcalidrawProps) => {
if (canvasActions?.export) {
UIOptions.canvasActions.export.saveFileToDisk =
canvasActions.export?.saveFileToDisk ||
canvasActions.export?.saveFileToDisk ??
DEFAULT_UI_OPTIONS.canvasActions.export.saveFileToDisk;
}