use-editable icon indicating copy to clipboard operation
use-editable copied to clipboard

Edit.insert does not trigger onChange

Open omnisnash opened this issue 3 years ago • 0 comments

First, thank for this hook, it's really nice work.

When I use Edit.insert(append: string, offset?: number): void, the text is correctly inserted in the editor but the onChange handler is not called, which result to a de-synchronization between the editor content and my state.

Here is a case reproduction: https://codesandbox.io/s/use-editable-forked-j2vztb?file=/src/Edit.js

Does I miss something ? Thanks in advance

omnisnash avatar Nov 03 '22 11:11 omnisnash