@cfpb/cfpb-forms
Advanced tools
Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "@cfpb/cfpb-forms", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Design System form fields", | ||
@@ -11,6 +11,6 @@ "less": "src/cfpb-forms.less", | ||
"dependencies": { | ||
"@cfpb/cfpb-buttons": "^0.10.0", | ||
"@cfpb/cfpb-core": "^0.10.0", | ||
"@cfpb/cfpb-grid": "^0.10.0", | ||
"@cfpb/cfpb-icons": "^0.10.0" | ||
"@cfpb/cfpb-buttons": "^0.11.0", | ||
"@cfpb/cfpb-core": "^0.11.0", | ||
"@cfpb/cfpb-grid": "^0.11.0", | ||
"@cfpb/cfpb-icons": "^0.11.0" | ||
}, | ||
@@ -20,3 +20,3 @@ "keywords": [ | ||
], | ||
"gitHead": "e70818e6bda242fbeb751f6c2068cc3112a0d997" | ||
"gitHead": "268f8a28c9b3aecaa11c15ab8466c9f09f83ebb1" | ||
} |
@@ -87,4 +87,4 @@ // Required modules. | ||
if ( _options.length > 0 ) { | ||
_model = new MultiselectModel( _options, _name ).init(); | ||
const newDom = _populateMarkup(); | ||
_model = new MultiselectModel( _options, _name ).init(); | ||
@@ -169,4 +169,9 @@ /* Removes <select> element, | ||
let optionsClasses = BASE_CLASS + '_options'; | ||
if ( _model.isAtMaxSelections() ) { | ||
optionsClasses += ' u-max-selections'; | ||
} | ||
_optionsDom = MultiselectUtils.create( 'ul', { | ||
className: BASE_CLASS + '_options', | ||
className: optionsClasses, | ||
inside: _fieldsetDom | ||
@@ -177,5 +182,7 @@ } ); | ||
let optionId; | ||
let isChecked; | ||
for ( let i = 0, len = _options.length; i < len; i++ ) { | ||
option = _options[i]; | ||
optionId = _getOptionId( option ); | ||
isChecked = _model.getOption( i ).checked; | ||
const optionsItemDom = MultiselectUtils.create( 'li', { | ||
@@ -194,3 +201,3 @@ 'data-option': option.value, | ||
'inside': optionsItemDom, | ||
'checked': option.defaultSelected, | ||
'checked': isChecked, | ||
'data-index': i | ||
@@ -209,3 +216,3 @@ } ); | ||
if ( option.defaultSelected ) { | ||
if ( isChecked ) { | ||
_createSelectedItem( _selectionsDom, option ); | ||
@@ -212,0 +219,0 @@ } |
@@ -69,3 +69,3 @@ // Undefined return value for void methods. | ||
item = list[i]; | ||
isChecked = item.defaultSelected; | ||
isChecked = isAtMaxSelections() ? false : item.defaultSelected; | ||
cleaned.push( { | ||
@@ -72,0 +72,0 @@ id: _getOptionId( item ), |
Sorry, the diff of this file is not supported yet
164937
3283
+ Added@cfpb/cfpb-buttons@0.11.4(transitive)
+ Added@cfpb/cfpb-core@0.11.4(transitive)
+ Added@cfpb/cfpb-grid@0.11.0(transitive)
+ Added@cfpb/cfpb-icons@0.11.0(transitive)
- Removed@cfpb/cfpb-buttons@0.10.0(transitive)
- Removed@cfpb/cfpb-core@0.10.0(transitive)
- Removed@cfpb/cfpb-grid@0.10.0(transitive)
- Removed@cfpb/cfpb-icons@0.10.0(transitive)
Updated@cfpb/cfpb-buttons@^0.11.0
Updated@cfpb/cfpb-core@^0.11.0
Updated@cfpb/cfpb-grid@^0.11.0
Updated@cfpb/cfpb-icons@^0.11.0