Socket
Socket
Sign inDemoInstall

react-textarea-autosize

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-textarea-autosize - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

example/Makefile

2

example/index.js

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

new TextareaAutosize({defaultValue: (new Array(15)).join('\nLine.')}),
document.body);
document.getElementById('main'));

@@ -40,15 +40,19 @@ var React = require('react');

getDiffSize: function() {
var styles = window.getComputedStyle(this.getDOMNode());
if (window.getComputedStyle) {
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") {
// 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;
} else {
this.diff = (
parseInt(styles.getPropertyValue('padding-bottom') || 0, 10) +
parseInt(styles.getPropertyValue('padding-top') || 0, 10)
);
}
} else {
this.diff = 0;
} else {
this.diff = (
parseInt(styles.getPropertyValue('padding-bottom') || 0, 10) +
parseInt(styles.getPropertyValue('padding-top') || 0, 10)
);
}

@@ -55,0 +59,0 @@ },

{
"name": "react-textarea-autosize",
"description": "textarea component for React which grows with content",
"version": "1.0.2",
"version": "1.0.3",
"author": {

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

# react-textarea-autosize
Replacement for textarea component which automatically grows textarea as content grows:
Drop-in replacement for the textarea component which automatically resizes textarea as content changes.
A native React version of the popular [jQuery
Autosize](http://www.jacklmoore.com/autosize/)!
var Textarea = require('react-textarea-autosize');
This module supports IE9 and above. PR welcome to add IE8 support.
React.renderComponent(
<div>
<Textarea></Textarea>
</div>,
document.body);
```javascript
var Textarea = require('react-textarea-autosize');
React.renderComponent(
<div>
<Textarea></Textarea>
</div>,
document.body);
```
## Install
`npm install react-textarea-autosize`
## Demo
http://andreypopp.github.io/react-textarea-autosize/
## Development

@@ -14,0 +26,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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