mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-31 02:49:56 +02:00
Rename <Slate>
component value
prop to initialValue
(#5421)
* Rename `slate-react` Slate component `value` prop to `initialValue` Fixes #4992 * Update documentation: `value` -> `initialValue` * Add a changeset record * Make props order consistent
This commit is contained in:
@@ -18,7 +18,7 @@ const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor()))
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
<Slate editor={editor} initialValue={initialValue}>
|
||||
<Editable />
|
||||
</Slate>
|
||||
)
|
||||
@@ -45,7 +45,7 @@ const App = () => {
|
||||
return (
|
||||
<Slate
|
||||
editor={editor}
|
||||
value={initialValue}
|
||||
initialValue={initialValue}
|
||||
onChange={value => {
|
||||
const isAstChange = editor.operations.some(
|
||||
op => 'set_selection' !== op.type
|
||||
@@ -85,7 +85,7 @@ const App = () => {
|
||||
return (
|
||||
<Slate
|
||||
editor={editor}
|
||||
value={initialValue}
|
||||
initialValue={initialValue}
|
||||
onChange={value => {
|
||||
const isAstChange = editor.operations.some(
|
||||
op => 'set_selection' !== op.type
|
||||
@@ -145,7 +145,7 @@ const App = () => {
|
||||
return (
|
||||
<Slate
|
||||
editor={editor}
|
||||
value={initialValue}
|
||||
initialValue={initialValue}
|
||||
onChange={value => {
|
||||
const isAstChange = editor.operations.some(
|
||||
op => 'set_selection' !== op.type
|
||||
|
Reference in New Issue
Block a user