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

Write value to component #2

Closed
henkverschoor1994 opened this issue Feb 28, 2020 · 4 comments
Closed

Write value to component #2

henkverschoor1994 opened this issue Feb 28, 2020 · 4 comments

Comments

@henkverschoor1994
Copy link

Is it possible to write a value into the component? For example I combined it with biometric login, so when the fingerprint is recognised I want to fill in the stored value.

And another small question, is it possible to make the delay smaller on mobile devices, of converting a visible number to hidden value.

@AlexMiniApps
Copy link
Owner

Is it possible to write a value into the component? For example I combined it with biometric login, so when the fingerprint is recognised I want to fill in the stored value.

I guess it is possible. I will add the feature.

And another small question, is it possible to make the delay smaller on mobile devices, of converting a visible number to hidden value.

For hiding the values is used CSS styles are processed by browsers. Delay caused by the browser's processing. I will think about how I can speed up hiding.

@henkverschoor1994
Copy link
Author

I think it is because it is not a single password field, but separate fields. The native procedure is when you press the next key, the previous will be hidden, so you can see only the last value.

And another question: The inputmode is "tel" when only digits are possible, could you change it into "numeric" because "numeric" doesn't show alphabetic characters on keyboard. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode

@AlexMiniApps
Copy link
Owner

And another question: The inputmode is "tel" when only digits are possible, could you change it into "numeric" because "numeric" doesn't show alphabetic characters on keyboard. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode

Sure. Will make it configurable.

@AlexMiniApps
Copy link
Owner

@henkverschoor1994 I have added new props (75ee754):

inputType: string - type of the input DOM elements like <input [type]="inputType"/> default 'tel'

code: string | number - the input code value for the component. If the parameter contains non digits chars and isNonDigitsCode is false the value will be ignored

using:

  <code-input [isCodeHidden]="false"
              [isNonDigitsCode]="false"
              [codeLength]="4"
              [inputType]="'numeric'"
              [code]="1234"
              (codeChanged)="onCodeChanged($event)"
              (codeCompleted)="onCodeCompleted($event)">
  </code-input>

Updated description:
https://github.com/AlexMiniApps/angular-code-input#component-options

Please update via npm install:
npm install --save angular-code-input@latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants