-
-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2760 from udecode/feat/comments-provider-refactor
Use React context for controlled CommentsProvider values
- Loading branch information
Showing
5 changed files
with
114 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
'@udecode/plate-comments': major | ||
--- | ||
|
||
- Renamed the `comments` prop on CommentsProvider to `initialComments` to reflect the fact that updating its value after the initial render has no effect | ||
- Removed the following props from CommentsProvider, since they represent the internal state of the comments plugin and should not be controlled externally: | ||
- `activeCommentId` | ||
- `addingCommentId` | ||
- `newValue` | ||
- `focusTextarea` | ||
- The following props on CommentsProvider can now be updated after the initial render (whereas prior to this version, doing so had no effect): | ||
- `myUserId` | ||
- `users` | ||
- `onCommentAdd` | ||
- `onCommentUpdate` | ||
- `onCommentDelete` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,4 +118,4 @@ export const tableValue: any = ( | |
</hp> | ||
{createSpanningTable()} | ||
</fragment> | ||
); | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters