Fix call service data

This commit is contained in:
Paulus Schoutsen 2017-05-20 07:47:34 -07:00
parent c5a5f41d3c
commit 6858555c86
3 changed files with 6 additions and 4 deletions

View File

@ -11,6 +11,7 @@
<link rel="import" href="../../bower_components/paper-listbox/paper-listbox.html">
<link rel="import" href="../../bower_components/paper-menu-button/paper-menu-button.html">
<link rel="import" href="../../bower_components/paper-fab/paper-fab.html">
<link rel="import" href="../../bower_components/iron-autogrow-textarea/iron-autogrow-textarea.html">
<link rel="import" href="../config/ha-config-section.html">

View File

@ -41,15 +41,16 @@ export default class JSONTextArea extends Component {
render(props, { value, isValid }) {
const style = {
minWidth: 300,
width: '100%',
};
if (!isValid) {
style.border = '1px solid red';
}
return (
<textarea
<iron-autogrow-textarea
value={value}
style={style}
onChange={this.onChange}
onValue-Changed={this.onChange}
/>
);
}

View File

@ -18,10 +18,10 @@ export default class CallServiceAction extends Component {
}
/* eslint-disable camelcase */
serviceDataChanged(service_data) {
serviceDataChanged(data) {
this.props.onChange(this.props.index, {
...this.props.action,
service_data,
data,
});
}