Skip to content

Edit.insert does not trigger onChange #25

Open
@omnisnash

Description

@omnisnash

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions