Skip to content

Clear the inputs? #27

Closed
Closed

Description

@luongvanphuc

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?

Activity

  1. AlexMiniApps commented on Feb 9, 2021

    @AlexMiniApps
    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);
      }
    
  2. AlexMiniApps commented on Feb 9, 2021

    @AlexMiniApps
    Owner

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

  3. luongvanphuc commented on Feb 9, 2021

    @luongvanphuc
    Author

    Thanks @AlexMiniApps 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy