Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear the inputs? #27

Closed
luongvanphuc opened this issue Feb 8, 2021 · 3 comments
Closed

Clear the inputs? #27

luongvanphuc opened this issue Feb 8, 2021 · 3 comments
Labels
await feedback enhancement New feature or request

Comments

@luongvanphuc
Copy link

Hi @AlexMiniApps, thanks for the component, it's lightweight and easy to use. In my app, there is a "Clear" button for users to easily clear the numbers and re-input again. Would you mind exposing this event?

@AlexMiniApps AlexMiniApps added the enhancement New feature or request label Feb 9, 2021
@AlexMiniApps
Copy link
Owner

@luongvanphuc Hello, thank you for using of the component. I will add such functionality. Currently you can use a workaround like to this:
in the template:

<code-input
...       
   [code]="code"
...
>
</code-input>

in the page:

  public code?: string;
...
  public reset(): void {
    this.code = '';
    setTimeout(() => this.code = undefined);
  }

AlexMiniApps added a commit that referenced this issue Feb 9, 2021
- Have fixed the issue #26
- Have implemented the feature #27
- Have added the method for an input field focusing
@AlexMiniApps
Copy link
Owner

@luongvanphuc Please install the new version. And follow the instructions:
https://github.com/AlexMiniApps/angular-code-input#methods

@luongvanphuc
Copy link
Author

Thanks @AlexMiniApps 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
await feedback enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants