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

material-ui-chip-input

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

material-ui-chip-input - npm Package Compare versions

Comparing version 1.0.0-beta.12 to 1.0.0-beta.13

7

lib/ChipInput.js

@@ -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",

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