Socket
Socket
Sign inDemoInstall

react-textarea-autosize

Package Overview
Dependencies
4
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

26

index.js

@@ -7,2 +7,10 @@ var React = require('react');

getInitialState: function() {
if (this.props.onChange) {
return {
"_onChange": this.props.onChange
};
}
},
componentDidMount: function() {

@@ -26,2 +34,12 @@ this.getDiffSize();

var styles = window.getComputedStyle(this.getDOMNode());
// If the textarea is set to border-box, it's not necessary to
// subtract the padding.
if (styles.getPropertyValue('box-sizing') === "border-box" ||
styles.getPropertyValue('-moz-box-sizing') === "border-box" ||
styles.getPropertyValue('-webkit-box-sizing') === "border-box") {
this.diff = 0;
return;
}
this.diff = (

@@ -44,4 +62,4 @@ parseInt(styles.getPropertyValue('padding-bottom') || 0, 10) +

onChange: function(e) {
if (this.props.onChange) {
this.props.onChange(e);
if (this.state._onChange) {
this.state._onChange(e);
}

@@ -58,5 +76,3 @@

for (var key in this.props) {
props[key] = this.props[key];
}
props = objectAssign(this.props, props);

@@ -63,0 +79,0 @@ return React.DOM.textarea(props, this.props.children);

2

package.json
{
"name": "react-textarea-autosize",
"description": "textarea component for React which grows with content",
"version": "1.0.0",
"version": "1.0.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Andrey Popp",

Sorry, the diff of this file is not supported yet

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