Skip to content

Commit b35c218

Browse files
author
Graham Butler
committed
update control
1 parent 9096c5b commit b35c218

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@author.io/element-control",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "author-control custom element (web component).",
55
"main": "dist/author-control.min.js",
66
"scripts": {

src/element.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,17 @@ class AuthorFormControlElement extends AuthorBaseElement(HTMLElement) {
147147
}
148148

149149
this.PRIVATE.initAuthorDatalist()
150+
break
151+
}
150152

151-
} else if (this.PRIVATE.fieldInputTypes.indexOf(this.PRIVATE.inputElement.type) >= 0) {
153+
if (this.PRIVATE.fieldInputTypes.indexOf(this.PRIVATE.inputElement.type) >= 0) {
152154
this.type = 'field'
153-
} else if (this.PRIVATE.toggleInputTypes.indexOf(this.PRIVATE.inputElement.type) >= 0) {
155+
break
156+
}
157+
158+
if (this.PRIVATE.toggleInputTypes.indexOf(this.PRIVATE.inputElement.type) >= 0) {
154159
this.type = 'toggle'
160+
break
155161
}
156162

157163
break
@@ -310,6 +316,10 @@ class AuthorFormControlElement extends AuthorBaseElement(HTMLElement) {
310316
return this.input.value
311317
}
312318

319+
set value (value) {
320+
this.input.value = value
321+
}
322+
313323
blur () {
314324
this.input.blur()
315325
}

0 commit comments

Comments
 (0)