diff --git a/CHANGELOG.md b/CHANGELOG.md index abaf8ee1..6a01447d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Sort the list of countries based on the current locale. Refs UISACQCOMP-164. * Add `inputType` prop to ``. Refs UISACQCOMP-165. * View the list of donors. Refs UISACQCOMP-166. +* Added `indexRef` and `inputRef` props to ``. Refs UISACQCOMP-167. ## [5.0.0](https://github.com/folio-org/stripes-acq-components/tree/v5.0.0) (2023-10-12) [Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v4.0.2...v5.0.0) diff --git a/lib/AcqList/SingleSearchForm/SingleSearchForm.js b/lib/AcqList/SingleSearchForm/SingleSearchForm.js index 137d6998..def465b1 100644 --- a/lib/AcqList/SingleSearchForm/SingleSearchForm.js +++ b/lib/AcqList/SingleSearchForm/SingleSearchForm.js @@ -31,6 +31,8 @@ const SingleSearchForm = ({ changeSearchIndex, searchableOptions, inputType, + indexRef, + inputRef, }) => { const [translatedSearchableIndexes, setTranslatedSearchableIndexes] = useState(); const intl = useIntl(); @@ -97,6 +99,8 @@ const SingleSearchForm = ({ searchableOptions={searchableOptions} searchableIndexesPlaceholder={searchableIndexesPlaceholder} selectedIndex={selectedIndex} + indexRef={indexRef} + inputRef={inputRef} inputType={inputType} lockWidth newLineOnShiftEnter @@ -141,6 +145,14 @@ SingleSearchForm.propTypes = { selectedIndex: PropTypes.string, changeSearchIndex: PropTypes.func, inputType: PropTypes.string, + indexRef: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.shape({ current: PropTypes.instanceOf(Element) }), + ]), + inputRef: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.shape({ current: PropTypes.instanceOf(Element) }), + ]), }; SingleSearchForm.defaultProps = {