1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

Solve warnings in dashboard and edit-dashboard

This commit is contained in:
Laura Fuentes Grau 2020-11-27 14:40:56 +01:00
parent 4fd5d1bdfc
commit 3c37fc45db
2 changed files with 3 additions and 2 deletions

View file

@ -512,7 +512,7 @@ class Dashboard extends Component {
{!draggable ? (
<WidgetArea widgets={this.state.widgets} dropZoneHeight={dropZoneHeight} editing={this.state.editing} grid={grid} onWidgetAdded={this.handleDrop.bind(this)}>
{this.state.widgets != null && Object.keys(this.state.widgets).map(widgetKey => (
<WidgetContainer widget={this.state.widgets[widgetKey]}>
<WidgetContainer widget={this.state.widgets[widgetKey]} key={widgetKey}>
<WidgetContextMenu
key={widgetKey}
index={parseInt(widgetKey, 10)}
@ -536,6 +536,7 @@ class Dashboard extends Component {
{this.state.widgets != null && Object.keys(this.state.widgets).map(widgetKey => (
<EditableWidgetContainer
widget={this.state.widgets[widgetKey]}
key={widgetKey}
grid={grid}
index={parseInt(widgetKey, 10)}
onWidgetChange={this.widgetChange.bind(this)}>

View file

@ -73,7 +73,7 @@ class EditDashboardDialog extends React.Component {
return (
<Dialog show={this.props.show} title="Edit Dashboard" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="name" validationState={this.validateForm('name')}>
<FormGroup controlId="name" validationstate={this.validateForm('name')}>
<FormLabel>Name</FormLabel>
<FormControl type="text" placeholder="Enter name" value={this.state.name} onChange={(e) => this.handleChange(e)} />
<FormControl.Feedback />