Skip to content

Commit

Permalink
Update docs (text-mask#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
msafi authored Oct 8, 2016
1 parent c8ea8d9 commit ef24429
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
5 changes: 5 additions & 0 deletions angular2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ As you can see in the code above, you are passing an object to the `textMask` di
Text Mask does not provide an option to unmask the model before storing it. You can sanitize the model on your
side. See [here](https://github.com/text-mask/text-mask/issues/109) for details.

##### `change` doesn't work

`change` on an input field will not work if `[text-mask]` is present. You can use `(ngModelChange)` instead. For more
information, see [this page](https://github.com/text-mask/text-mask/issues/236).

## Example

To see an example of the code running, follow these steps:
Expand Down
14 changes: 12 additions & 2 deletions componentDocumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
* [`pipe`](#pipe) (function)
* [`onReject`](#onreject) (function)
* [`onAccept`](#onaccept) (function)
* [Supported `<input>` types](#supported-input-types)
* Known issues
* [Supported `<input>` types](#supported-input-types)
* [Updating the `mask` or other values after initialization](#updating-the-mask-or-other-values-after-initialization)

## `mask`

Expand Down Expand Up @@ -197,8 +199,16 @@ a character that is accepted and displayed on the input element.

---

## Supported `<input>` types
## Known issues

### Supported `<input>` types

Please note that Text Mask supports input type of `text`, `tel`, `url`, `password`, and `search`. Due to a limitation
in browser API, other input types, such as `email` or `number`, cannot be supported. However, it is normal to let the
user enter an email or a number in an input type `text` combined the appropriate input mask.

### Updating the `mask` or other values after initialization

Once Text Mask has been initialized on an input field, it's not possible to change the mask or other configurations. In
frameworks such as React or Ember, you may expect that you can hot-swap values, but that would not work with Text Mask.
See [this page](https://github.com/text-mask/text-mask/issues/233) for some workarounds for this limitation.

0 comments on commit ef24429

Please sign in to comment.