From 6c564fff1739ce415c7b773707df896bd269d82c Mon Sep 17 00:00:00 2001 From: Andy E Phipps Date: Thu, 31 Aug 2023 11:38:39 +0100 Subject: [PATCH] feat: Schools FSU msg prop and new default value (#585) --- .../SimpleSchoolLookup/SimpleSchoolLookup.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js b/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js index 8b71329ce..094f98eac 100644 --- a/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js +++ b/src/components/Molecules/SimpleSchoolLookup/SimpleSchoolLookup.js @@ -41,14 +41,14 @@ const schoolToString = school => `${school.name}, ${school.post_code}`; * @returns {JSX.Element} * @constructor */ -const SimpleSchoolLookup = ({ onSelect, ...rest }) => ( +const SimpleSchoolLookup = ({ onSelect, noResultsMessage, ...rest }) => ( ( /> ); +SimpleSchoolLookup.defaultProps = { + noResultsMessage: 'Sorry, we could not find anything matching your search; please use the manual entry option.' +}; + SimpleSchoolLookup.propTypes = { - onSelect: PropTypes.func.isRequired + onSelect: PropTypes.func.isRequired, + noResultsMessage: PropTypes.string }; export default SimpleSchoolLookup;