Skip to content

Commit

Permalink
Added disabled prop
Browse files Browse the repository at this point in the history
Added disabled on typeConf of TypeaheadField and AsyncTypeaheadField
  • Loading branch information
alboo89 authored and alessandro-coolshop committed Apr 2, 2019
1 parent 7e10a19 commit 15b870c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/TypeaheadField.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export class TypeaheadField extends BaseTypeaheadField {
uiSchema: { typeahead },
idSchema: { $id } = {},
schema,
disabled,
} = this.props;

let labelKey = mapLabelKey(typeahead.labelKey);
Expand All @@ -290,6 +291,7 @@ export class TypeaheadField extends BaseTypeaheadField {
labelKey,
selected: this.state.selected,
onBlur: this.handleBlur,
disabled,
});

return (
Expand Down Expand Up @@ -382,6 +384,7 @@ export class AsyncTypeaheadField extends BaseTypeaheadField {
uiSchema: { asyncTypeahead },
idSchema: { $id } = {},
schema,
disabled,
} = this.props;

let labelKey = mapLabelKey(asyncTypeahead.labelKey);
Expand All @@ -397,6 +400,7 @@ export class AsyncTypeaheadField extends BaseTypeaheadField {
options: this.state.options,
onFocus: this.handleOnFocus,
onBlur: this.handleBlur,
disabled,
});

if (asyncTypeahead.overrideOptions) {
Expand Down

0 comments on commit 15b870c

Please sign in to comment.