Skip to content

Commit 358776c

Browse files
committed
UISACQCOMP-167 Added indexRef and inputRef props to <SingleSearchForm>
1 parent f1c9d0e commit 358776c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Sort the list of countries based on the current locale. Refs UISACQCOMP-164.
66
* Add `inputType` prop to `<SingleSearchForm>`. Refs UISACQCOMP-165.
77
* View the list of donors. Refs UISACQCOMP-166.
8+
* Added `indexRef` and `inputRef` props to `<SingleSearchForm>`. Refs UISACQCOMP-167.
89

910
## [5.0.0](https://github.com/folio-org/stripes-acq-components/tree/v5.0.0) (2023-10-12)
1011
[Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v4.0.2...v5.0.0)

lib/AcqList/SingleSearchForm/SingleSearchForm.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ const SingleSearchForm = ({
3131
changeSearchIndex,
3232
searchableOptions,
3333
inputType,
34+
indexRef,
35+
inputRef,
3436
}) => {
3537
const [translatedSearchableIndexes, setTranslatedSearchableIndexes] = useState();
3638
const intl = useIntl();
@@ -97,6 +99,8 @@ const SingleSearchForm = ({
9799
searchableOptions={searchableOptions}
98100
searchableIndexesPlaceholder={searchableIndexesPlaceholder}
99101
selectedIndex={selectedIndex}
102+
indexRef={indexRef}
103+
inputRef={inputRef}
100104
inputType={inputType}
101105
lockWidth
102106
newLineOnShiftEnter
@@ -141,6 +145,14 @@ SingleSearchForm.propTypes = {
141145
selectedIndex: PropTypes.string,
142146
changeSearchIndex: PropTypes.func,
143147
inputType: PropTypes.string,
148+
indexRef: PropTypes.oneOfType([
149+
PropTypes.func,
150+
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
151+
]),
152+
inputRef: PropTypes.oneOfType([
153+
PropTypes.func,
154+
PropTypes.shape({ current: PropTypes.instanceOf(Element) }),
155+
]),
144156
};
145157

146158
SingleSearchForm.defaultProps = {

0 commit comments

Comments
 (0)