mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-30 18:39:51 +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:
@@ -20,7 +20,7 @@ const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor()))
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
<Slate editor={editor} initialValue={initialValue}>
|
||||
<Editable />
|
||||
</Slate>
|
||||
)
|
||||
@@ -41,7 +41,7 @@ const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor()))
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
<Slate editor={editor} initialValue={initialValue}>
|
||||
<Editable
|
||||
// Define a new handler which prints the key that was pressed.
|
||||
onKeyDown={event => {
|
||||
@@ -71,7 +71,7 @@ const App = () => {
|
||||
const [editor] = useState(() => withReact(createEditor()))
|
||||
|
||||
return (
|
||||
<Slate editor={editor} value={initialValue}>
|
||||
<Slate editor={editor} initialValue={initialValue}>
|
||||
<Editable
|
||||
onKeyDown={event => {
|
||||
if (event.key === '&') {
|
||||
|
Reference in New Issue
Block a user