mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: library restoring changes (#4995)
* restore library items in all cases & refactor * export `restoreLibraryItems` from package * feat: rerender library menu when updating via API * update readme & changelog * fix changelog
This commit is contained in:
parent
bf6d0eeef7
commit
70b3a9de49
6 changed files with 71 additions and 29 deletions
|
@ -1700,6 +1700,11 @@ class App extends React.Component<AppProps, AppState> {
|
|||
this.library.saveLibrary(
|
||||
restoreLibraryItems(sceneData.libraryItems, "unpublished"),
|
||||
);
|
||||
if (this.state.isLibraryOpen) {
|
||||
this.setState({ isLibraryOpen: false }, () => {
|
||||
this.setState({ isLibraryOpen: true });
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue