mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
Minor refactoring
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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 = (
|
||||||
|
|||||||
Reference in New Issue
Block a user