Skip to content

Commit 842d1ea

Browse files
author
Graham Butler
committed
remove auto-validation features for production version bump @1.0.2
1 parent 8183c9e commit 842d1ea

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
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-select",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "author-select custom element (web component).",
55
"main": "dist/author-select.min.js",
66
"scripts": {

src/element.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,11 @@ class AuthorSelectElement extends AuthorBaseElement(HTMLElement) {
183183

184184
this.emit('options.selected', evt.detail.options, this.selectedOptionsElement)
185185

186-
if (this.checkValidity()) {
187-
this.removeAttribute('invalid')
188-
} else {
189-
this.setAttribute('invalid', '')
190-
}
186+
// if (this.checkValidity()) {
187+
// this.removeAttribute('invalid')
188+
// } else {
189+
// this.setAttribute('invalid', '')
190+
// }
191191

192192
if (afterChange && typeof afterChange === 'function') {
193193
afterChange(evt.detail.previous, this.selectedOptions)
@@ -231,9 +231,9 @@ class AuthorSelectElement extends AuthorBaseElement(HTMLElement) {
231231
this.UTIL.printToConsole(`"size" attribute is not supported. Please use CSS to set the height of the options panel instead.`, 'warning')
232232
},
233233

234-
toggleHandler: evt => this.open = !this.open,
234+
toggleHandler: evt => this.open = !this.open//,
235235

236-
validationHandler: evt => this.emit('invalid')
236+
// validationHandler: evt => this.emit('invalid')
237237
})
238238

239239
this.UTIL.registerListeners(this, {
@@ -271,17 +271,17 @@ class AuthorSelectElement extends AuthorBaseElement(HTMLElement) {
271271
}
272272
},
273273

274-
connected: () => {
275-
this.sourceElement.addEventListener('invalid', this.PRIVATE.validationHandler)
276-
277-
if (!this.checkValidity()) {
278-
this.setAttribute('invalid', '')
279-
}
280-
},
281-
282-
disconnected: () => {
283-
this.sourceElement.removeEventListener('invalid', this.PRIVATE.validationHandler)
284-
},
274+
// connected: () => {
275+
// this.sourceElement.addEventListener('invalid', this.PRIVATE.validationHandler)
276+
//
277+
// if (!this.checkValidity()) {
278+
// this.setAttribute('invalid', '')
279+
// }
280+
// },
281+
282+
// disconnected: () => {
283+
// this.sourceElement.removeEventListener('invalid', this.PRIVATE.validationHandler)
284+
// },
285285

286286
blur: this.PRIVATE.blurHandler,
287287
focus: this.PRIVATE.focusHandler,

0 commit comments

Comments
 (0)