Skip to content

Commit 7782ffd

Browse files
committed
Forward attribute props to <InputTrigger />
1 parent 151b12a commit 7782ffd

File tree

7 files changed

+35
-6
lines changed

7 files changed

+35
-6
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@
1313
}
1414
],
1515
"react"
16+
],
17+
"plugins": [
18+
"transform-object-rest-spread"
1619
]
1720
}

docs/app.04f9c.js renamed to docs/app.601a0.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,5 @@
7373
<img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"
7474
alt="Fork me on GitHub">
7575
</a>
76-
<script type="text/javascript" src="./app.04f9c.js"></script></body>
76+
<script type="text/javascript" src="./app.601a0.js"></script></body>
7777
</html>

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"babel-cli": "^6.26.0",
3333
"babel-core": "^6.26.0",
3434
"babel-loader": "^7.1.3",
35+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
3536
"babel-preset-env": "^1.6.1",
3637
"babel-preset-react": "^6.24.1",
3738
"cross-env": "^5.1.4",
@@ -43,9 +44,9 @@
4344
"html-webpack-plugin": "^2.30.1",
4445
"npm-run-all": "^4.1.2",
4546
"pre-commit": "^1.2.2",
47+
"prop-types": ">=15.6.1",
4648
"react": ">=15.6.1",
4749
"react-dom": ">=15.6.1",
48-
"prop-types": ">=15.6.1",
4950
"rimraf": "^2.6.2",
5051
"webpack": "^3",
5152
"webpack-dev-server": "^2",

src/index.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,23 @@ class InputTrigger extends Component {
108108
}
109109

110110
render() {
111-
const { elementRef, children } = this.props;
111+
const {
112+
elementRef,
113+
children,
114+
trigger,
115+
onStart,
116+
onCancel,
117+
onType,
118+
endTrigger,
119+
...rest
120+
} = this.props;
112121

113122
return (
114123
<div
115-
role="button"
124+
role="textbox"
116125
tabIndex={-1}
117126
onKeyDown={this.handleTrigger}
127+
{...rest}
118128
>
119129
{
120130
!elementRef

webpack.common.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const path = require('path');
2-
const webpack = require('webpack');
32

43
module.exports = {
54
entry: {

0 commit comments

Comments
 (0)