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

react-autosize-textarea

Package Overview
Dependencies
Maintainers
0
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-autosize-textarea - npm Package Compare versions

Comparing version 0.3.6 to 0.4.0

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Change Log

## [v0.4.0](https://github.com/buildo/react-autosize-textarea/tree/v0.4.0) (2017-03-30)
[Full Changelog](https://github.com/buildo/react-autosize-textarea/compare/v0.3.6...v0.4.0)
#### Breaking:
- Remove react-tcomb [#30](https://github.com/buildo/react-autosize-textarea/issues/30)
## [v0.3.6](https://github.com/buildo/react-autosize-textarea/tree/v0.3.6) (2017-01-22)

@@ -7,0 +14,0 @@ [Full Changelog](https://github.com/buildo/react-autosize-textarea/compare/v0.3.5...v0.3.6)

29

lib/TextareaAutosize.js

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

});
exports.default = exports.Props = undefined;
exports.default = undefined;

@@ -13,3 +13,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _dec, _class, _class2, _temp2;
var _class, _temp2;

@@ -24,4 +24,2 @@ var _react = require('react');

var _tcombReact = require('tcomb-react');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -41,8 +39,2 @@

var Props = exports.Props = {
rows: _tcombReact.t.maybe(_tcombReact.t.Integer),
maxRows: _tcombReact.t.maybe(_tcombReact.t.Integer),
onResize: _tcombReact.t.maybe(_tcombReact.t.Function)
};
/** A light replacement for built-in textarea component

@@ -54,3 +46,3 @@ * which automaticaly adjusts its height to match the content

*/
var TextareaAutosize = (_dec = (0, _tcombReact.props)(Props, { strict: false }), _dec(_class = (_temp2 = _class2 = function (_React$Component) {
var TextareaAutosize = (_temp2 = _class = function (_React$Component) {
_inherits(TextareaAutosize, _React$Component);

@@ -86,3 +78,3 @@

return _tcombReact.t.Number.is(maxRows) && numberOfRows >= maxRows;
return numberOfRows >= parseInt(maxRows);
}, _this.updateMaxHeight = function (value) {

@@ -202,5 +194,12 @@ var _this2 = _this,

return TextareaAutosize;
}(_react2.default.Component), _class2.defaultProps = {
}(_react2.default.Component), _class.defaultProps = {
rows: 1
}, _temp2)) || _class);
exports.default = TextareaAutosize;
}, _temp2);
exports.default = TextareaAutosize;
TextareaAutosize.propTypes = {
rows: _react2.default.PropTypes.number,
maxRows: _react2.default.PropTypes.number,
onResize: _react2.default.PropTypes.func
};
{
"name": "react-autosize-textarea",
"version": "0.3.6",
"version": "0.4.0",
"description": "replacement for built-in textarea which auto resizes itself",
"main": "index.js",
"main": "lib",
"scripts": {

@@ -15,3 +15,4 @@ "test": "npm run build && ./node_modules/karma/bin/karma start",

"clean": "rm -f examples/bundle.js examples/bundle.js.map",
"generate-readme": "node ./generateReadme.js"
"generate-readme": "node ./generateReadme.js",
"release-version": "smooth-release"
},

@@ -37,2 +38,7 @@ "repository": {

},
"files": [
"lib",
"src",
"examples"
],
"homepage": "https://github.com/buildo/react-autosize-textarea",

@@ -65,2 +71,3 @@ "devDependencies": {

"require-dir": "^0.3.0",
"smooth-release": "^8.0.0",
"webpack": "^1.12.12",

@@ -74,5 +81,4 @@ "webpack-dev-server": "^1.14.1"

"dependencies": {
"autosize": "^3.0.15",
"tcomb-react": "^0.9.3"
"autosize": "^3.0.15"
}
}
import React from 'react';
import autosize from 'autosize';
import { t, props } from 'tcomb-react';

@@ -9,7 +8,2 @@ const UPDATE = 'autosize:update',

export const Props = {
rows: t.maybe(t.Integer),
maxRows: t.maybe(t.Integer),
onResize: t.maybe(t.Function)
};

@@ -22,3 +16,2 @@ /** A light replacement for built-in textarea component

*/
@props(Props, { strict: false })
export default class TextareaAutosize extends React.Component {

@@ -73,3 +66,3 @@

return t.Number.is(maxRows) && numberOfRows >= maxRows;
return numberOfRows >= parseInt(maxRows);
}

@@ -146,1 +139,7 @@

}
TextareaAutosize.propTypes = {
rows: React.PropTypes.number,
maxRows: React.PropTypes.number,
onResize: React.PropTypes.func
};

Sorry, the diff of this file is too big to display

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