Skip to content

Commit 18c0b85

Browse files
authored
feat: add id prop for formatted input (#80)
* feat: add id prop for formatted input * docs: update README.md
1 parent cf2846a commit 18c0b85

File tree

6 files changed

+111
-156
lines changed

6 files changed

+111
-156
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ value | `number` | `undefined` | Initial value. If left `unde
6464
locale | `string` | `en-US` | Overrides default locale. [Examples](https://gist.github.com/ncreated/9934896) |
6565
currency | `string` | `USD` | Overrides default currency. [Examples](https://www.xe.com/symbols/) |
6666
name | `string` | `total` | Applies the name to the [input fields](#how-it-works) for _unformatted_ (e.g `[name=total]`) and _formatted_ (e.g. `[name=formatted-total]`) values |
67-
required | `boolean` | `false` | Marks the inputs as required |
68-
disabled | `boolean` | `false` | Marks the inputs as disabled |
67+
id | `string` | `undefined` | Sets the `id` attribute on the input |
68+
required | `boolean` | `false` | Marks the input as required |
69+
disabled | `boolean` | `false` | Marks the input as disabled |
6970
placeholder | `string` `number` `null` | `0` | A `string` will override the default placeholder. A `number` will override it by formatting it to the set currency. Setting it to `null` will not show a placeholder |
7071
isZeroNullish | `boolean` | `false` | If `true` and when the value is `0`, it will override the default placeholder and render the formatted value in the field like any other value. _Note: this option might become the default in future versions_ |
7172
autocomplete | `string` | `undefined` | Sets the autocomplete attribute. Accepts any valid HTML [autocomplete attribute values](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values) |

0 commit comments

Comments
 (0)