Skip to content

Commit 737801e

Browse files
[ADD] id as a property
1 parent 9ab900d commit 737801e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Read more on `vue-form-generator`'s [instruction page](https://icebob.gitbooks.i
112112
| `maxLen` | `Number` | `25` | Native input 'maxlength' attribute |
113113
| `wrapperClasses` | `String | Array | Object` | `''` | Custom classes for the wrapper |
114114
| `inputClasses` | `String | Array | Object` | `''` | Custom classes for the `input` |
115+
| `inputId` | `String` | `''` | Custom 'id' for the `input` |
115116
| `dropdownOptions` | `Object` | `{ disabledDialCode: false, tabindex: 0 }` | Options for dropdown, supporting `disabledDialCode` and `tabindex`|
116117
| `inputOptions` | `Object` | `{ showDialCode: false, tabindex: 0 }` | Options for input, supporting `showDialCode` (always show dial code in the input) and `tabindex`|
117118
| `validCharactersOnly` | `Boolean` | `false` | Only allow valid characters in a phone number (will also verify in `mounted`, so phone number with invalid characters will be shown as an empty string) |

src/vue-tel-input.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
:autocomplete="autocomplete"
4040
:name="name"
4141
:class="inputClasses"
42+
:id="inputId"
4243
:maxlength="maxLen"
4344
@blur="onBlur"
4445
@input="onInput"
@@ -219,6 +220,10 @@ export default {
219220
type: [String, Array, Object],
220221
default: '',
221222
},
223+
inputId: {
224+
type: 'String',
225+
default: '',
226+
},
222227
dropdownOptions: {
223228
type: Object,
224229
default: () => ({}),

0 commit comments

Comments
 (0)