material-ui-chip-input
Advanced tools
Comparing version 1.0.0-beta.12 to 1.0.0-beta.13
@@ -555,3 +555,3 @@ 'use strict'; | ||
var hasInput = (this.props.value || actualInputValue).length > 0 || actualInputValue.length > 0; | ||
var shrinkFloatingLabel = InputLabelProps.shrink != null ? InputLabelProps.shrink : label != null && (hasInput || this.state.isFocused); | ||
var shrinkFloatingLabel = InputLabelProps.shrink != null ? InputLabelProps.shrink : label != null && (hasInput || this.state.isFocused || chips.length > 0); | ||
@@ -578,6 +578,3 @@ var chipComponents = chips.map(function (tag, i) { | ||
if (variant === 'outlined') { | ||
if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') { | ||
InputMore.notched = InputLabelProps.shrink; | ||
} | ||
InputMore.notched = shrinkFloatingLabel; | ||
InputMore.labelWidth = shrinkFloatingLabel && this.labelNode && this.labelNode.offsetWidth || 0; | ||
@@ -584,0 +581,0 @@ } |
@@ -290,3 +290,3 @@ 'use strict'; | ||
it('shrinks if there are chips', function () { | ||
var tree = (0, _enzyme.mount)(_react2.default.createElement(_ChipInput2.default, { label: 'Floating label', value: ['foo'] })); | ||
var tree = (0, _enzyme.mount)(_react2.default.createElement(_ChipInput2.default, { label: 'Floating label', defaultValue: ['asdf'] })); | ||
expect(tree.find('InputLabel').prop('shrink')).toBe(true); | ||
@@ -293,0 +293,0 @@ }); |
{ | ||
"name": "material-ui-chip-input", | ||
"version": "1.0.0-beta.12", | ||
"version": "1.0.0-beta.13", | ||
"typings": "typings/index.d.ts", | ||
@@ -46,3 +46,3 @@ "description": "A chip input field using Material-UI.", | ||
"devDependencies": { | ||
"@material-ui/core": "^3.1.0", | ||
"@material-ui/core": "^3.9.0", | ||
"@storybook/addon-actions": "^3.4.4", | ||
@@ -49,0 +49,0 @@ "@storybook/react": "^3.4.4", |
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
416347
1131