Skip to content

Commit

Permalink
Merge pull request #727 from folio-org/UISACQCOMP-167
Browse files Browse the repository at this point in the history
UISACQCOMP-167 Added `indexRef` and `inputRef` props to `<SingleSearchForm>`
  • Loading branch information
BogdanDenis authored Nov 8, 2023
2 parents f1c9d0e + 358776c commit 0b6d10c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Sort the list of countries based on the current locale. Refs UISACQCOMP-164.
* Add `inputType` prop to `<SingleSearchForm>`. Refs UISACQCOMP-165.
* View the list of donors. Refs UISACQCOMP-166.
* Added `indexRef` and `inputRef` props to `<SingleSearchForm>`. 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)
Expand Down
12 changes: 12 additions & 0 deletions lib/AcqList/SingleSearchForm/SingleSearchForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const SingleSearchForm = ({
changeSearchIndex,
searchableOptions,
inputType,
indexRef,
inputRef,
}) => {
const [translatedSearchableIndexes, setTranslatedSearchableIndexes] = useState();
const intl = useIntl();
Expand Down Expand Up @@ -97,6 +99,8 @@ const SingleSearchForm = ({
searchableOptions={searchableOptions}
searchableIndexesPlaceholder={searchableIndexesPlaceholder}
selectedIndex={selectedIndex}
indexRef={indexRef}
inputRef={inputRef}
inputType={inputType}
lockWidth
newLineOnShiftEnter
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 0b6d10c

Please sign in to comment.