@the-grid/ed
Advanced tools
Comparing version 0.20.2 to 0.20.3
## dev | ||
## 0.21.3 - 2016-09-04 | ||
* Link inputs `autocapitalize='none'` to help with (#272) on mobile | ||
## 0.20.2 - 2016-09-04 | ||
@@ -4,0 +8,0 @@ |
@@ -97,2 +97,5 @@ 'use strict'; | ||
var placeholder = _props.placeholder; | ||
var _props2 = this.props; | ||
var inputMode = _props2.inputMode; | ||
var autoCapitalize = _props2.autoCapitalize; | ||
var _state = this.state; | ||
@@ -103,2 +106,7 @@ var value = _state.value; | ||
if (label === 'Link') { | ||
inputMode = 'url'; | ||
autoCapitalize = 'none'; | ||
} | ||
return (0, _react.createElement)('div', { className: 'TextareaAutosize ' + this.props.className, | ||
@@ -111,2 +119,4 @@ style: containerStyle | ||
placeholder: placeholder, | ||
inputMode: inputMode, | ||
autoCapitalize: autoCapitalize, | ||
onChange: this.boundOnChange, | ||
@@ -161,5 +171,5 @@ rows: 1, | ||
value: function onChange(event) { | ||
var _props2 = this.props; | ||
var validator = _props2.validator; | ||
var onChange = _props2.onChange; | ||
var _props3 = this.props; | ||
var validator = _props3.validator; | ||
var onChange = _props3.onChange; | ||
@@ -191,2 +201,4 @@ var valid = true; | ||
placeholder: _react2.default.PropTypes.string, | ||
inputMode: _react2.default.PropTypes.string, | ||
autoCapitalize: _react2.default.PropTypes.string, | ||
onChange: _react2.default.PropTypes.func, | ||
@@ -197,4 +209,6 @@ onKeyDown: _react2.default.PropTypes.func, | ||
}; | ||
TextareaAutosize.defaultProps = { multiline: false | ||
TextareaAutosize.defaultProps = { multiline: false, | ||
inputMode: '', | ||
autoCapitalize: 'sentences' | ||
}; | ||
exports.default = _react2.default.createFactory(TextareaAutosize); |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.20.2", | ||
"version": "0.20.3", | ||
"description": "the grid api with prosemirror", | ||
@@ -8,0 +8,0 @@ "main": "dist/ed.js", |
@@ -64,4 +64,10 @@ require('./textarea-autosize.css') | ||
const {label, placeholder} = this.props | ||
let {inputMode, autoCapitalize} = this.props | ||
const {value, valid} = this.state | ||
if (label === 'Link') { | ||
inputMode = 'url' | ||
autoCapitalize = 'none' | ||
} | ||
return el('div' | ||
@@ -81,2 +87,4 @@ , { className: `TextareaAutosize ${this.props.className}` | ||
, placeholder | ||
, inputMode | ||
, autoCapitalize | ||
, onChange: this.boundOnChange | ||
@@ -149,2 +157,4 @@ , rows: 1 | ||
, placeholder: React.PropTypes.string | ||
, inputMode: React.PropTypes.string | ||
, autoCapitalize: React.PropTypes.string | ||
, onChange: React.PropTypes.func | ||
@@ -157,3 +167,5 @@ , onKeyDown: React.PropTypes.func | ||
{ multiline: false | ||
, inputMode: '' | ||
, autoCapitalize: 'sentences' | ||
} | ||
export default React.createFactory(TextareaAutosize) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7493353
15080