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

react-collapsible-react16

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-collapsible-react16 - npm Package Compare versions

Comparing version 16.0.0 to 16.0.1

2

dist/Collapsible.js

@@ -189,3 +189,3 @@ 'use strict';

// Don't render children until the first opening of the Collapsible if lazy rendering is enabled
var children = this.state.isClosed && !this.state.inTransition ? null : this.props.children;
var children = this.props.lazyRender && !this.state.hasBeenOpened && this.state.isClosed && !this.state.inTransition ? null : this.props.children;

@@ -192,0 +192,0 @@ // Construct CSS classes strings

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

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

"prop-types": "^15.5.8",
"react": ">=15.5.4",
"react-dom": ">=15.5.4"
"react": "~15 || ~16",
"react-dom": "~15 || ~16"
}
}

@@ -14,3 +14,3 @@ # React Responsive Collapsible Section Component (Collapsible)

---
## Migrating from v1.x to v2.0
## Migrating from v1.x to v2.x
Version 2 is 100% API complete to version 1. However, there is a breaking change in the `onOpen` and `onClose` callbacks. These methods now fire at the end of the collapsing animation. There is also the addition of `onOpening` and `onClosing` callbacks which fire at the beginning of the animation.

@@ -20,3 +20,6 @@

## What's new in 2.0
# What's new in version 2.0.1
Issues fixed (#50, #52)
### 2.0.0 release notes
* Added `onClosing` and `onOpening` callback props.

@@ -161,3 +164,3 @@ * Several issue fixes (#12, #21, #24)

### `.Collapsible__contentInner`
This is a container for the content passed into the compoenent. This keeps everything nice and neat and allows the component to do all it's whizzy calculations.
This is a container for the content passed into the component. This keeps everything nice and neat and allows the component to do all it's whizzy calculations.

@@ -168,3 +171,3 @@ If you're using a CSS framework such as Foundation or Bootstrap, you probably want to use their classes instead of styling `.Collapsible`. See Properties above.

## Example
An example of the component in action is available in the example folder. To see it in action you can run `wepback-dev-server` which will run the webpack build and open the example.
An example of the component in action is available in the example folder. To see it in action you can run `webpack-dev-server` which will run the webpack build and open the example.

@@ -171,0 +174,0 @@ ---

@@ -151,3 +151,6 @@ import React, { Component } from 'react';

// Don't render children until the first opening of the Collapsible if lazy rendering is enabled
var children = (this.state.isClosed && !this.state.inTransition) ? null : this.props.children;
var children = this.props.lazyRender
&& !this.state.hasBeenOpened
&& this.state.isClosed
&& !this.state.inTransition ? null : this.props.children;

@@ -166,4 +169,4 @@ // Construct CSS classes strings

<div className={parentClassString.trim()}>
<span
className={triggerClassString.trim()}
<span
className={triggerClassString.trim()}
onClick={this.handleTriggerClick}>

@@ -175,5 +178,5 @@ {trigger}

<div
className={outerClassString.trim()}
ref="outer"
<div
className={outerClassString.trim()}
ref="outer"
style={dropdownStyle}

@@ -180,0 +183,0 @@ onTransitionEnd={this.handleTransitionEnd}

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