api-viewer-element
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -19,2 +19,10 @@ # Change Log | ||
## [0.3.8] - 2020-02-03 | ||
### Fixed | ||
- Docs: match attribute with different name | ||
- Demo: fix empty value for numeric knobs | ||
- Demo: support attribute with different name | ||
## [0.3.7] - 2020-01-09 | ||
@@ -21,0 +29,0 @@ |
@@ -218,3 +218,3 @@ import { __decorate } from "tslib"; | ||
case 'number': | ||
value = Number(target.value); | ||
value = target.value === '' ? null : Number(target.value); | ||
break; | ||
@@ -273,5 +273,5 @@ default: | ||
const name = event.replace(s, ''); | ||
const prop = this.props.find(p => p.name === name); | ||
const prop = this.props.find(p => p.attribute === name || p.name === name); | ||
if (prop) { | ||
this._syncKnob(component, name, prop.type); | ||
this._syncKnob(component, prop.name, prop.type); | ||
} | ||
@@ -278,0 +278,0 @@ } |
@@ -13,3 +13,3 @@ import { __decorate } from "tslib"; | ||
const processAttrs = (attrs, props) => { | ||
return attrs.filter(attr => !props.some(prop => prop.name === attr.name)); | ||
return attrs.filter(({ name }) => !props.some(prop => prop.attribute === name || prop.name === name)); | ||
}; | ||
@@ -16,0 +16,0 @@ const renderItem = (name, description, valueType, attribute, value) => { |
{ | ||
"name": "api-viewer-element", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "Web Components API viewer element", | ||
@@ -5,0 +5,0 @@ "author": "Serhii Kulykov <iamkulykov@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
194790