@lion/choice-input
Advanced tools
Comparing version 0.7.7 to 0.8.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [0.8.0](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.7...@lion/choice-input@0.8.0) (2020-03-25) | ||
### Features | ||
* **field:** align (pre)filled and empty, fix filled not working ([e397f8d](https://github.com/ing-bank/lion/commit/e397f8d68b44c2ccb6447a908a97ace6568738ad)) | ||
## [0.7.7](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.6...@lion/choice-input@0.7.7) (2020-03-19) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@lion/choice-input", | ||
"version": "0.7.7", | ||
"version": "0.8.0", | ||
"description": "Base for all choise inputs like checkbox/radio", | ||
@@ -37,9 +37,9 @@ "author": "ing-bank", | ||
"dependencies": { | ||
"@lion/core": "0.4.5", | ||
"@lion/field": "0.11.4" | ||
"@lion/core": "0.5.0", | ||
"@lion/field": "0.12.0" | ||
}, | ||
"devDependencies": { | ||
"@lion/fieldset": "0.9.4", | ||
"@lion/input": "0.5.19", | ||
"@lion/validate": "0.8.0", | ||
"@lion/fieldset": "0.10.0", | ||
"@lion/input": "0.5.20", | ||
"@lion/validate": "0.9.0", | ||
"@open-wc/demoing-storybook": "^1.10.4", | ||
@@ -49,3 +49,3 @@ "@open-wc/testing": "^2.5.0", | ||
}, | ||
"gitHead": "f286e3ac28fe0b34284383344fda4dc8e9ea593d" | ||
"gitHead": "29e1252560d3fda898f98c271a7b685d1e929035" | ||
} |
@@ -98,3 +98,2 @@ import { dedupeMixin } from '@lion/core'; | ||
_isEmpty() { | ||
const value = this.modelValue; | ||
if (this.multipleChoice) { | ||
@@ -104,6 +103,6 @@ return this.modelValue.length === 0; | ||
if (typeof value === 'string' && value === '') { | ||
if (typeof this.modelValue === 'string' && this.modelValue === '') { | ||
return true; | ||
} | ||
if (value === undefined || value === null) { | ||
if (this.modelValue === undefined || this.modelValue === null) { | ||
return true; | ||
@@ -110,0 +109,0 @@ } |
/* eslint-disable class-methods-use-this */ | ||
import { html, css, nothing } from '@lion/core'; | ||
import { css, html, nothing } from '@lion/core'; | ||
import { FormatMixin } from '@lion/field'; | ||
@@ -156,12 +156,2 @@ | ||
* @override | ||
* Override InteractionStateMixin | ||
* 'prefilled' should be false when modelValue is { checked: false }, which would return | ||
* true in original method (since non-empty objects are considered prefilled by default). | ||
*/ | ||
static _isPrefilled(modelValue) { | ||
return modelValue.checked; | ||
} | ||
/** | ||
* @override | ||
* This method is overridden from FormatMixin. It originally fired the normalizing | ||
@@ -168,0 +158,0 @@ * 'user-input-changed' event after listening to the native 'input' event. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59544
870
+ Added@lion/core@0.5.0(transitive)
+ Added@lion/field@0.12.0(transitive)
+ Added@lion/localize@0.9.0(transitive)
+ Added@lion/validate@0.9.0(transitive)
+ Added@open-wc/scoped-elements@1.3.7(transitive)
- Removed@lion/core@0.4.5(transitive)
- Removed@lion/field@0.11.4(transitive)
- Removed@lion/localize@0.8.10(transitive)
- Removed@lion/validate@0.8.0(transitive)
- Removed@open-wc/scoped-elements@0.5.0(transitive)
Updated@lion/core@0.5.0
Updated@lion/field@0.12.0