Skip to content

Feature request idea(input): toggle the transform function when CTRL+SPACE is clicked #1330

@matteosacchetto

Description

@matteosacchetto

This idea comes to mind especially from using the password prompt, where being able to toggle the visibility of the password may be something useful. So, today I was wondering if this was something others could be interested in and may be worth up-streaming to the input prompt.

Basically the idea is that, when the user presses the CTRL+SPACE key combination, the transform function is temporarily bypassed to allow the user to see the non-transformed input. If CTRL+SPACE is pressed again, then the transform function is again activated. Whenever the user presses the ENTER key the transform function will be applied independently if it was previously bypassed or not.

Implementing such functionality is rather easy and could be versatile in different situations from just the use in the password prompt, though could be interesting to hear some feedback on this by other users of this library.

For reference here is an example of the modified input prompt with the suggested feature implemented.

https://stackblitz.com/edit/stackblitz-starters-ed1f1b?file=index.ts

Thank you,
Matteo

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions