Skip to content

Commit

Permalink
feat: add disabled option to schoolLookup
Browse files Browse the repository at this point in the history
  • Loading branch information
lebaz20 committed Oct 24, 2017
1 parent 252ce9f commit 33d9b52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/SchoolsLookUp/SchoolsLookUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class SchoolsLookUp extends Component {
const {
establishmentNameValue, address1Value, address2Value, address3Value, townValue, postcodeValue,
establishmentNameIdentifier, address1Identifier, address2Identifier, address3Identifier,
townIdentifier, postcodeIdentifier, min, selectedEstablishment,
townIdentifier, postcodeIdentifier, min, selectedEstablishment, disabled,
} = this.props;
const { lookup, options, isSearching } = this.state;
const orEnterManuallyCopy = 'Or enter details manually';
Expand Down Expand Up @@ -381,6 +381,7 @@ class SchoolsLookUp extends Component {
renderMenu={this.renderMenu}
options={options}
useCache={false}
disabled={disabled}
/>
{isSearching ?
<Icon name="spinner" spin />:
Expand Down Expand Up @@ -444,6 +445,7 @@ SchoolsLookUp.defaultProps = {
postcodeIdentifier: 'postcode',
postcodeErrorMessage: '',
postcodeRequired: true,
disabled: false,
validateField: () => {},
};

Expand Down Expand Up @@ -489,6 +491,7 @@ SchoolsLookUp.propTypes = {
postcodeIdentifier: PropTypes.string,
postcodeErrorMessage: PropTypes.string,
validateField: PropTypes.func,
disabled: PropTypes.bool,
};

export default SchoolsLookUp;

0 comments on commit 33d9b52

Please sign in to comment.