Minor refactoring

This commit is contained in:
Philipp Czora
2018-11-22 10:20:18 +01:00
parent 11a7d9e775
commit c23e0f4610
2 changed files with 3 additions and 3 deletions

View File

@@ -27,14 +27,14 @@ class AutocompleteAddEntryToTableField extends React.Component<Props, State> {
this.state = { selectedValue: undefined }; this.state = { selectedValue: undefined };
} }
render() { render() {
const { disabled, buttonLabel, fieldLabel, helpText } = this.props; const { disabled, buttonLabel, fieldLabel, helpText, loadSuggestions } = this.props;
const { selectedValue } = this.state; const { selectedValue } = this.state;
return ( return (
<div className="field"> <div className="field">
<Autocomplete <Autocomplete
label={fieldLabel} label={fieldLabel}
loadSuggestions={this.props.loadSuggestions} loadSuggestions={loadSuggestions}
valueSelected={this.handleAddEntryChange} valueSelected={this.handleAddEntryChange}
helpText={helpText} helpText={helpText}
value={selectedValue} value={selectedValue}

View File

@@ -68,7 +68,7 @@ class GroupForm extends React.Component<Props, State> {
render() { render() {
const { t, loading } = this.props; const { t, loading } = this.props;
const group = this.state.group; const { group } = this.state;
let nameField = null; let nameField = null;
if (!this.props.group) { if (!this.props.group) {
nameField = ( nameField = (