1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00

fix(change.md): correct setOperationFlag() signature (#2161)

This commit is contained in:
Eric Edem 2018-09-15 17:30:25 -07:00 committed by Ian Storm Taylor
parent 6340469266
commit ebea68d0ac

View File

@ -99,7 +99,7 @@ Set the entire `value` using either a `properties` object or a `Value` object. C
Warning: Calling `setValue` with a `Value` object has unpredictable behavior including the loss of the edit history. Only use with a `Value` object if you know what you are doing. For most use cases, we recommend passing `properties` as an `Object` (e.g. `change.setValue({data: myNewDataObject})`.
Hint: Wrapping the call to `setValue` as follows can be helpful if you want to update a value, like in the value's `data` but do not want to have another save point in the undo history: `change.setOperationFlag({save: false}).setValue({data: myNewDataObject}).setOperationFlag({save: true}).
Hint: Wrapping the call to `setValue` as follows can be helpful if you want to update a value, like in the value's `data` but do not want to have another save point in the undo history: `change.setOperationFlag('save', false).setValue({data: myNewDataObject}).setOperationFlag('save', true).
## Current Selection Changes