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

react-fluid-textarea

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fluid-textarea - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

16

lib/index.js

@@ -38,5 +38,4 @@ 'use strict';

_this.setState({ scrollHeight: 0 }, function () {
_this.setState({ scrollHeight: _this.textarea.scrollHeight });
});
_this.textarea.style.height = 'auto';
_this.setState({ height: _this.textarea.scrollHeight });

@@ -57,2 +56,7 @@ (_this$props = _this.props).onInput.apply(_this$props, arguments);

_createClass(ResizableTextArea, [{
key: 'componentDidMount',
value: function componentDidMount() {
this.setState({ height: this.textarea.scrollHeight });
}
}, {
key: 'render',

@@ -62,3 +66,3 @@ value: function render() {

lineHeight: '1.5em',
height: this.state.scrollHeight,
height: this.state.height,
overflowY: 'hidden'

@@ -80,6 +84,8 @@ });

ref: Function.prototype,
onInput: Function.prototype
onInput: Function.prototype,
style: null
};
ResizableTextArea.propTypes = {
style: _propTypes2.default.object,
ref: _propTypes2.default.func,

@@ -86,0 +92,0 @@ onInput: _propTypes2.default.func

{
"name": "react-fluid-textarea",
"version": "0.0.1",
"version": "0.0.2",
"description": "Automatically resizes your text area to the amount you type.",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -10,6 +10,8 @@ import React from 'react';

}
componentDidMount() {
this.setState({ height: this.textarea.scrollHeight });
}
onInput = (...args) => {
this.setState({ scrollHeight: 0 }, () => {
this.setState({ scrollHeight: this.textarea.scrollHeight });
});
this.textarea.style.height = 'auto';
this.setState({ height: this.textarea.scrollHeight });

@@ -27,3 +29,3 @@ this.props.onInput(...args);

lineHeight: '1.5em',
height: this.state.scrollHeight,
height: this.state.height,
overflowY: 'hidden',

@@ -46,5 +48,7 @@ };

onInput: Function.prototype,
style: null,
};
ResizableTextArea.propTypes = {
style: PropTypes.object,
ref: PropTypes.func,

@@ -51,0 +55,0 @@ onInput: PropTypes.func,

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