Skip to content

feat: Mask input #249

Merged
ChronosSF merged 52 commits intomasterfrom
rkaraivanov/masked-input
Apr 20, 2022
Merged

feat: Mask input #249
ChronosSF merged 52 commits intomasterfrom
rkaraivanov/masked-input

Conversation

@rkaraivanov
Copy link
Copy Markdown
Member

Closes #173

* Masked value with focus/blur/drag
* Handle valid/invalid states
* More unit tests
Copy link
Copy Markdown
Member

@damyanpetev damyanpetev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The spec mentions set an autofocus attribute so that the field can become focused on initial page load but it doesn't work Nvm this works, just not as I expected in Storybook and had to refresh the entire page
  • When an empty input is readonly focusing it still brings up the mask with prompts, which I think shouldn't happen as it suggest it can be edited
  • With the default mask if you fill some end portion (i.e. skip a few start positions) when you focus back the input the value shifts to the start. Bit edge, but still landed on it
  • The input event is fired when deleting over literals that in a mask does nothing, but I'll chuck that under a minor gripe and can be left as is

ChronosSF and others added 5 commits April 14, 2022 11:03
* Focus mask application only on empty state
* Validation fix
* Parser refactoring to validate and apply only based on mask positions
@rkaraivanov rkaraivanov requested a review from damyanpetev April 18, 2022 10:03
@ChronosSF ChronosSF self-requested a review April 20, 2022 08:32
@simeonoff simeonoff self-requested a review April 20, 2022 13:11
@ChronosSF ChronosSF merged commit ccc9c35 into master Apr 20, 2022
@ChronosSF ChronosSF deleted the rkaraivanov/masked-input branch April 20, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Masked input component

4 participants