Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Doc name change reverting on reload #478

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/client/Licit.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,18 @@ class Licit extends React.Component<any, any> {
);
});
};

/**
*
* Method to update Doc name on name change in props
*/

updateDocName = (objectMetaData: any): void => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Any, not a Licit bug, and this function does more than what the function name says.

const view: EditorView = this.editorView;
let tr = view.state.tr;
tr = tr.step(new SetDocAttrStep('objectMetaData', objectMetaData || null));
view.dispatch(tr);
};
}

export default Licit;
2 changes: 2 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export class Licit extends React.Component<any, any> {
goToEnd(): void;

pageLayout(): void;

updateDocName(objectMetaData: any): void;
}

// from './Types';
Expand Down