Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-radio-button

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-radio-button - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

tests/unit/components/labeled-radio-button-test.js

7

addon/components/labeled-radio-button.js
import Ember from 'ember';
var computed = Ember.computed;
export default Ember.Component.extend({
tagName: 'label',
classNameBindings: ['checked'],
checked: computed('groupValue', 'value', function(){
return this.get('groupValue') === this.get('value');
}).readOnly(),
actions: {

@@ -7,0 +14,0 @@ innerRadioChanged: function(value) {

1

addon/components/radio-button.js

@@ -29,2 +29,3 @@ import Ember from 'ember';

this.set('attributeBindings', updatedAttrs);
this.set('classNameBindings', ['checked']);
}

@@ -31,0 +32,0 @@ }),

4

package.json
{
"name": "ember-radio-button",
"version": "1.0.0",
"version": "1.0.1",
"directories": {

@@ -22,3 +22,3 @@ "doc": "doc",

"broccoli-asset-rev": "0.3.1",
"ember-cli": "0.1.7",
"ember-cli": "0.2.2",
"ember-cli-content-security-policy": "0.3.0",

@@ -25,0 +25,0 @@ "ember-cli-htmlbars": "^0.6.0",

@@ -96,2 +96,21 @@ import Ember from 'ember';

test('it gives the label of a wrapped checkbox a `checked` className', function() {
expect(2);
var component = this.subject({
groupValue: 'initial-group-value',
value: 'component-value',
template: function() { return 'Blue'; }
});
this.append();
equal(component.$().hasClass('checked'), false);
run(function() {
component.set('value', 'initial-group-value');
});
equal(component.$().hasClass('checked'), true);
});
test('it updates when setting `value`', function() {

@@ -98,0 +117,0 @@ expect(3);

Sorry, the diff of this file is not supported yet

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