Skip to content

Prevent "Enter" key action #9953

@nickmacia

Description

@nickmacia

There is no way to prevent a TextInput field from updating the text given a key input. For instance, even if I want to reserve "Enter" for a special purpose in a multiline textinput, when I press it the component first forces the on screen text to perform an "Enter" action, namely by adding \n to the input value. But I don't want this to happen. I just want to listen for an "Enter" event while suppressing the "Enter" action similar to onKeyDown.preventDefault() in javascript for html.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions