Skip to content

Commit bc1bc83

Browse files
Merge pull request #2313 from Aditya-githubbb/expose-downshift-props
feat(SearchBox): expose downShiftProps for Downshift customization
2 parents efb8203 + b7afc09 commit bc1bc83

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/web/src/components/search/SearchBox.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @jsxRuntime classic */
22
/** @jsx jsx */
33
import { jsx } from '@emotion/core';
4+
import PropTypes from 'prop-types';
45
import {
56
AI_LOCAL_CACHE_KEY,
67
AI_TRIGGER_MODES,
@@ -113,6 +114,7 @@ const SearchBox = (props) => {
113114
value,
114115
defaultValue,
115116
componentId,
117+
downShiftProps,
116118
rawData,
117119
aggregationData,
118120
isLoading,
@@ -1736,6 +1738,7 @@ const SearchBox = (props) => {
17361738
id={`${props.componentId}-downshift`}
17371739
onChange={onSuggestionSelected}
17381740
onStateChange={handleStateChange}
1741+
{...downShiftProps}
17391742
isOpen={isOpen}
17401743
itemToString={i => i}
17411744
render={({
@@ -2556,11 +2559,13 @@ SearchBox.propTypes = {
25562559
testMode: types.bool,
25572560
__showImageDropdown: types.bool,
25582561
__dummyImage: types.string,
2562+
downShiftProps: PropTypes.object,
25592563
};
25602564

25612565
SearchBox.defaultProps = {
25622566
autosuggest: true,
25632567
className: null,
2568+
downShiftProps: {},
25642569
debounce: 100,
25652570
downShiftProps: {},
25662571
enableSynonyms: true,

0 commit comments

Comments
 (0)