Socket
Socket
Sign inDemoInstall

@lion/choice-input

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lion/choice-input - npm Package Compare versions

Comparing version 0.7.5 to 0.7.6

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [0.7.6](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.5...@lion/choice-input@0.7.6) (2020-03-12)
### Bug Fixes
* **choice-input:** fix serializedValue setter check ([0445b86](https://github.com/ing-bank/lion/commit/0445b86350f65649c03ed84bfaf9652838c43e55))
## [0.7.5](https://github.com/ing-bank/lion/compare/@lion/choice-input@0.7.4...@lion/choice-input@0.7.5) (2020-03-05)

@@ -8,0 +19,0 @@

4

package.json
{
"name": "@lion/choice-input",
"version": "0.7.5",
"version": "0.7.6",
"description": "Base for all choise inputs like checkbox/radio",

@@ -48,3 +48,3 @@ "author": "ing-bank",

},
"gitHead": "54c4432b818cf1f6023557d0df5c461ae50412da"
"gitHead": "af03fd41b05efece395518b1ae938cad56f247f1"
}
import { dedupeMixin } from '@lion/core';
import { InteractionStateMixin, FormRegistrarMixin } from '@lion/field';
import { FormRegistrarMixin, InteractionStateMixin } from '@lion/field';

@@ -52,3 +52,3 @@ export const ChoiceGroupMixin = dedupeMixin(

set serializedValue(value) {
this._setCheckedElements(value, (el, val) => el.serializedValue === val);
this._setCheckedElements(value, (el, val) => el.serializedValue.value === val);
}

@@ -55,0 +55,0 @@

import { html, LitElement } from '@lion/core';
import { FormGroupMixin } from '@lion/fieldset';
import '@lion/fieldset/lion-fieldset.js';
import { LionInput } from '@lion/input';

@@ -8,3 +9,2 @@ import { Required } from '@lion/validate';

import { ChoiceInputMixin } from '../src/ChoiceInputMixin.js';
import '@lion/fieldset/lion-fieldset.js';

@@ -120,2 +120,14 @@ describe('ChoiceGroupMixin', () => {

it('can set initial serializedValue on creation', async () => {
const el = await fixture(html`
<choice-group name="gender" .serializedValue=${'other'}>
<choice-group-input .choiceValue=${'male'}></choice-group-input>
<choice-group-input .choiceValue=${'female'}></choice-group-input>
<choice-group-input .choiceValue=${'other'}></choice-group-input>
</choice-group>
`);
expect(el.serializedValue).to.equal('other');
});
it('can handle complex data via choiceValue', async () => {

@@ -122,0 +134,0 @@ const date = new Date(2018, 11, 24, 10, 33, 30, 0);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc