mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 19:52:32 +02:00
add resetKeyGenerator docs
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
Utility functions that ship with Slate that may be useful for certain use cases.
|
Utility functions that ship with Slate that may be useful for certain use cases.
|
||||||
|
|
||||||
- [`findDOMNode`](#finddomnode)
|
- [`findDOMNode`](#finddomnode)
|
||||||
|
- [`resetKeyGenerator`](#resetkeygenerator)
|
||||||
- [`setKeyGenerator`](#setkeygenerator)
|
- [`setKeyGenerator`](#setkeygenerator)
|
||||||
|
|
||||||
|
|
||||||
@@ -21,6 +22,11 @@ Utility functions that ship with Slate that may be useful for certain use cases.
|
|||||||
|
|
||||||
Allows you to find the DOM node for a Slate [`Node`](../models/node.md) by passing its `key` string. Modelled after React's built-in `findDOMNode` helper.
|
Allows you to find the DOM node for a Slate [`Node`](../models/node.md) by passing its `key` string. Modelled after React's built-in `findDOMNode` helper.
|
||||||
|
|
||||||
|
### `resetKeyGenerator`
|
||||||
|
`resetkeygenerator() => Void`
|
||||||
|
|
||||||
|
Resets Slate's internal key generating function to its default state. This is useful for server-side rendering, or anywhere you want to ensure fresh, deterministic creation of keys.
|
||||||
|
|
||||||
### `setKeyGenerator`
|
### `setKeyGenerator`
|
||||||
`setKeyGenerator(generator: Function) => Void`
|
`setKeyGenerator(generator: Function) => Void`
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user