@@ -70,10 +70,9 @@ function BlockContent(blockDTO: Block) {
70
70
const focusId = useRecoilValue ( focusState ) ;
71
71
const listCnt = useRef ( 1 ) ;
72
72
const [ Dispatcher ] = useCommand ( ) ;
73
- const [
74
- { blockIndex, prevSiblings } ,
75
- { commitTransaction, startTransaction, setBlock, deleteBlock } ,
76
- ] = useManager ( blockDTO . id ) ;
73
+ const [ { blockIndex, prevSiblings } , { setBlock, deleteBlock } ] = useManager (
74
+ blockDTO . id ,
75
+ ) ;
77
76
const [ draggingBlock , setDraggingBlock ] = useRecoilState ( draggingBlockState ) ;
78
77
const [ dragOverToggle , setDragOverToggle ] = useState ( false ) ;
79
78
@@ -115,9 +114,7 @@ function BlockContent(blockDTO: Block) {
115
114
type ?: BlockType ,
116
115
caretOffset = - 1 ,
117
116
) => {
118
- startTransaction ( ) ;
119
117
await setBlock ( blockDTO . id , { value, type : type || blockDTO . type } ) ;
120
- commitTransaction ( ) ;
121
118
} ;
122
119
123
120
const handleValue = async ( ) => {
@@ -220,9 +217,7 @@ function BlockContent(blockDTO: Block) {
220
217
! blockDTO . childIdList . length
221
218
) {
222
219
setImmediate ( async ( ) => {
223
- startTransaction ( ) ;
224
220
await deleteBlock ( ) ;
225
- commitTransaction ( ) ;
226
221
} ) ;
227
222
}
228
223
@@ -271,11 +266,9 @@ function BlockContent(blockDTO: Block) {
271
266
toId : blockDTO . parentId ,
272
267
index : blockIndex + 1 ,
273
268
} ) ;
274
- startTransaction ( ) ;
275
269
await setBlock ( block . id , block ) ;
276
270
fromBlock && ( await setBlock ( fromBlock . id , fromBlock ) ) ;
277
271
await setBlock ( to . id , to ) ;
278
- commitTransaction ( ) ;
279
272
setDraggingBlock ( null ) ;
280
273
event . preventDefault ( ) ;
281
274
} ;
0 commit comments