Skip to content

Commit 8c56bf7

Browse files
committed
Don't require onDropdownShow/onDropdownClose
1 parent 413dd2c commit 8c56bf7

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ Change valueExtractor and pass the data to Autocomplete without fetchDataUrl
161161
scrollToInput | Focus on selected field | Function | -
162162
handleSelectItem | Selection callback (args: item, index) | Function | -
163163
onDropdownShow | Show keyboard | Function | -
164-
onDropdownClose | Hide keyboard | Function | -
164+
onDropdownClose | Hide keyboard | Function | -
165165
onChangeText | Autocomplete input text changes | Function | -
166166
renderIcon | Render icon near input | Function | -
167167
valueExtractor | Extract value from item (args: item, index) | Function | ({ value }) => value

components/Autocomplete/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ Autocomplete.propTypes = {
236236
renderIcon: func,
237237
scrollToInput: func.isRequired,
238238
handleSelectItem: func.isRequired,
239-
onDropdownClose: func.isRequired,
240-
onDropdownShow: func.isRequired,
239+
onDropdownClose: func,
240+
onDropdownShow: func,
241241
rightTextExtractor: func,
242242
fetchData: func,
243243
};

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ type AutocompleteProps = {
3535

3636
scrollToInput: (ev: any) => void,
3737
handleSelectItem: (item: any, index: number) => void,
38-
onDropdownShow: () => void,
39-
onDropdownClose: () => void,
38+
onDropdownShow?: () => void,
39+
onDropdownClose?: () => void,
4040
onChangeText?: (search: string) => void,
4141
renderIcon?: () => void,
4242
valueExtractor?: (item: any) => void,

0 commit comments

Comments
 (0)