-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(rich-text-editor)!: Rename value to defaultValue
To conform to React naming convention for form control props. Uncontrolled form fields take a `defaultValue` to indicate that changes to this prop's value will not update the mounted component. Rather, the component manages its current value as internal state, and notifies subscribers via onChange when it changes. Consumers will need to update their code to the new prop name. E.g. before: ```jsx <RichTextEditor value={…}> ``` and after: ```jsx <RichTextEditor defaultValue={…}> ```
- Loading branch information
Showing
3 changed files
with
31 additions
and
5 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,23 @@ | ||
--- | ||
"@kaizen/rich-text-editor": major | ||
--- | ||
|
||
Rename `value` prop to reflect uncontrolled form field | ||
|
||
To conform to React naming convention for form control props. | ||
Uncontrolled form fields take a `defaultValue` to indicate that | ||
changes to this prop's value will not update the mounted component. | ||
Rather, the component manages its current value as internal state, | ||
and notifies subscribers via onChange when it changes. | ||
|
||
Consumers will need to update their code to the new prop name. E.g. before: | ||
|
||
```jsx | ||
<RichTextEditor value={…}> | ||
``` | ||
|
||
and after: | ||
|
||
```jsx | ||
<RichTextEditor defaultValue={…}> | ||
``` |
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