mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-17 06:16:33 +00:00
Fix call service data
This commit is contained in:
parent
c5a5f41d3c
commit
6858555c86
@ -11,6 +11,7 @@
|
|||||||
<link rel="import" href="../../bower_components/paper-listbox/paper-listbox.html">
|
<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-menu-button/paper-menu-button.html">
|
||||||
<link rel="import" href="../../bower_components/paper-fab/paper-fab.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">
|
<link rel="import" href="../config/ha-config-section.html">
|
||||||
|
|
||||||
|
@ -41,15 +41,16 @@ export default class JSONTextArea extends Component {
|
|||||||
render(props, { value, isValid }) {
|
render(props, { value, isValid }) {
|
||||||
const style = {
|
const style = {
|
||||||
minWidth: 300,
|
minWidth: 300,
|
||||||
|
width: '100%',
|
||||||
};
|
};
|
||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
style.border = '1px solid red';
|
style.border = '1px solid red';
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<textarea
|
<iron-autogrow-textarea
|
||||||
value={value}
|
value={value}
|
||||||
style={style}
|
style={style}
|
||||||
onChange={this.onChange}
|
onValue-Changed={this.onChange}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,10 @@ export default class CallServiceAction extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable camelcase */
|
/* eslint-disable camelcase */
|
||||||
serviceDataChanged(service_data) {
|
serviceDataChanged(data) {
|
||||||
this.props.onChange(this.props.index, {
|
this.props.onChange(this.props.index, {
|
||||||
...this.props.action,
|
...this.props.action,
|
||||||
service_data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user