Skip to content

Commit 14be2e7

Browse files
authored
Merge pull request #38 from toggm/dev/support_disableFullscreenUI
Dev/support disable fullscreen ui
2 parents 27441ab + d22060c commit 14be2e7

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ Change valueExtractor and pass the data to Autocomplete without fetchDataUrl
148148
noDataText | Text to display when no results | String | No Results
149149
initialValue | Text to display initially | String | -
150150
inputContainerStyle | Styles for autocomplete container | Object | -
151+
disableFullscreenUI | disable display inputfield in fullscreen | Boolean | false
151152
inputStyle | Styles for autocomplete input | Object | -
152153
spinnerStyle | Styles for activity indicator | Object | -
153154
noDataTextStyle | Styles for empty results text | Object | -
@@ -172,6 +173,7 @@ Change valueExtractor and pass the data to Autocomplete without fetchDataUrl
172173
fetchData | Fetch data for autocomplete | Function | -
173174

174175

176+
175177
## Methods
176178

177179
You can use methods through `ref` property:
@@ -210,8 +212,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
210212
### Authors:
211213

212214
**[Maksym Plotnikov](https://github.com/maksym-plotnikov)**
213-
215+
214216
**[Maksym Kordiyak](https://github.com/maxkordiyak)**
215-
216-
While developing our react-native application I found out that there's no autocomplete library available which can satisfy a need for > 1 autocomplete on a page. Styles were overlapping and due to position: "absolute" we weren't able to actually trigger TouchableOpacity on an element from the list on android device. We used a library which provides dropdown with auto-adjusting position using measureInWindow on a ref, we tweaked it a bit and with autocomplete input and time-slicing implementation we managed to get what we need. Still we can't interact with TextInput component while dropdown is opened but this is the best result we got using React Native Modal.
217217

218+
While developing our react-native application I found out that there's no autocomplete library available which can satisfy a need for > 1 autocomplete on a page. Styles were overlapping and due to position: "absolute" we weren't able to actually trigger TouchableOpacity on an element from the list on android device. We used a library which provides dropdown with auto-adjusting position using measureInWindow on a ref, we tweaked it a bit and with autocomplete input and time-slicing implementation we managed to get what we need. Still we can't interact with TextInput component while dropdown is opened but this is the best result we got using React Native Modal.

components/Autocomplete/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ class Autocomplete extends Component {
170170
spinnerColor,
171171
placeholderColor,
172172
data,
173+
disableFullscreenUI,
173174
...dropdownProps
174175
} = this.props;
175176

@@ -185,6 +186,7 @@ class Autocomplete extends Component {
185186
style={[styles.input, inputStyle]}
186187
placeholder={placeholder}
187188
placeholderTextColor={placeholderColor || theme.textSecondary}
189+
disableFullscreenUI={disableFullscreenUI}
188190
value={inputValue}
189191
autoCorrect={autoCorrect}
190192
keyboardType={keyboardType}

0 commit comments

Comments
 (0)