Socket
Socket
Sign inDemoInstall

react-collapsible

Package Overview
Dependencies
20
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.2.0

20

dist/Collapsible.js

@@ -27,3 +27,4 @@ 'use strict';

triggerWhenOpen: _react2.default.PropTypes.oneOfType([_react2.default.PropTypes.string, _react2.default.PropTypes.element]),
lazyRender: _react2.default.PropTypes.bool
lazyRender: _react2.default.PropTypes.bool,
overflowWhenOpen: _react2.default.PropTypes.oneOf(['hidden', 'visible', 'auto', 'scroll', 'inherit', 'initial', 'unset'])
},

@@ -38,3 +39,4 @@

classParentString: 'Collapsible',
lazyRender: false
lazyRender: false,
overflowWhenOpen: 'hidden'
};

@@ -52,3 +54,4 @@ },

transition: 'none',
hasBeenOpened: true
hasBeenOpened: true,
overflow: this.props.overflowWhenOpen
};

@@ -61,3 +64,4 @@ } else {

transition: 'height ' + this.props.transitionTime + 'ms ' + this.props.easing,
hasBeenOpened: false
hasBeenOpened: false,
overflow: 'hidden'
};

@@ -143,3 +147,4 @@ }

shouldSwitchAutoOnNextCycle: true,
height: this.refs.inner.offsetHeight
height: this.refs.inner.offsetHeight,
overflow: 'hidden'
});

@@ -161,3 +166,4 @@ },

transition: 'none',
shouldSwitchAutoOnNextCycle: false
shouldSwitchAutoOnNextCycle: false,
overflow: this.props.overflowWhenOpen
});

@@ -186,3 +192,3 @@ },

transition: this.state.transition,
overflow: 'hidden'
overflow: this.state.overflow
};

@@ -189,0 +195,0 @@

{
"name": "react-collapsible",
"version": "1.1.0",
"version": "1.2.0",
"description": "React component to wrap content in Collapsible element with trigger to open and close.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -9,5 +9,8 @@ # React Responsive Collapsible Section Component (Collapsible)

## New in version 1.1.0
* `lazyRender` props added to allow lazy-loading of Collapsile content.
## New in version 1.2.0
* `overflowWhenOpen` props added to allow setting of the CSS overflow property when Collapsible is open.
### 1.1.0 Notes
* `lazyRender` props added to allow lazy-loading of Collapsible content.
### 1.0.0 Notes

@@ -83,2 +86,5 @@ * Trigger can now be a React Element as well as a string.

### `overflowWhenOpen` | *enum* | default: 'hidden'
The CSS overflow property once the Collapsible is open. This can be any one of the valid CSS values of `'hidden'`, `'visible'`, `'auto'`, `'scroll'`, `'inherit'`, `'initial'`, or `'unset'`
## CSS Styles

@@ -85,0 +91,0 @@ In theory you don't need any CSS to get this to work, but let's face it, it'd be pretty rubbish without it.

@@ -22,3 +22,12 @@ import React from 'react';

]),
lazyRender: React.PropTypes.bool
lazyRender: React.PropTypes.bool,
overflowWhenOpen: React.PropTypes.oneOf([
'hidden',
'visible',
'auto',
'scroll',
'inherit',
'initial',
'unset'
])
},

@@ -33,3 +42,4 @@

classParentString: 'Collapsible',
lazyRender: false
lazyRender: false,
overflowWhenOpen: 'hidden'
};

@@ -47,3 +57,4 @@ },

transition: 'none',
hasBeenOpened: true
hasBeenOpened: true,
overflow: this.props.overflowWhenOpen
}

@@ -57,3 +68,4 @@ }

transition: 'height ' + this.props.transitionTime + 'ms ' + this.props.easing,
hasBeenOpened: false
hasBeenOpened: false,
overflow: 'hidden'
}

@@ -143,3 +155,4 @@ }

shouldSwitchAutoOnNextCycle: true,
height: this.refs.inner.offsetHeight
height: this.refs.inner.offsetHeight,
overflow: 'hidden',
});

@@ -161,3 +174,4 @@ },

transition: 'none',
shouldSwitchAutoOnNextCycle: false
shouldSwitchAutoOnNextCycle: false,
overflow: this.props.overflowWhenOpen
});

@@ -184,3 +198,3 @@ },

transition: this.state.transition,
overflow: 'hidden'
overflow: this.state.overflow
}

@@ -187,0 +201,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc