@things-factory/component-ui
Advanced tools
Comparing version 0.0.20 to 0.0.21
@@ -128,4 +128,6 @@ import { LitElement, html, css } from 'lit-element' | ||
_adjustColumnProperty() { | ||
const input = this.shadowRoot.querySelector('input') | ||
if (!input) return | ||
const inputWidth = input.offsetWidth | ||
const totalWidth = window.innerWidth | ||
const inputWidth = this.shadowRoot.querySelector('input').offsetWidth | ||
const inputCount = Array.from(this.shadowRoot.querySelectorAll('input')).length | ||
@@ -142,10 +144,18 @@ let columnCount = | ||
get getForm() { | ||
get form() { | ||
return this.shadowRoot.querySelector('form') | ||
} | ||
clear() { | ||
this.getForm.reset() | ||
getFields() { | ||
return Array.from(this.shadowRoot.querySelector('form').children) | ||
} | ||
reset() { | ||
this.form && this.form.reset() | ||
} | ||
submit() { | ||
this.dispatchEvent(new CustomEvent('submit')) | ||
} | ||
focusById(id) { | ||
@@ -157,3 +167,3 @@ const input = this.shadowRoot.querySelector(`form > #${id}`) | ||
checkValidity() { | ||
return this.getForm.checkValidity() | ||
return this.form.checkValidity() | ||
} | ||
@@ -163,3 +173,3 @@ | ||
let data = {} | ||
Array.from(this.getForm.children).forEach(children => { | ||
Array.from(this.form.children).forEach(children => { | ||
if (children.type === 'number') { | ||
@@ -176,3 +186,3 @@ data[children.name] = parseFloat(children.value) | ||
getSearchParams() { | ||
return FormSerialize(this.getForm) | ||
return FormSerialize(this.form) | ||
} | ||
@@ -179,0 +189,0 @@ } |
{ | ||
"name": "@things-factory/component-ui", | ||
"version": "0.0.20", | ||
"version": "0.0.21", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
562132
14844
0