secullum-react-native-ui 4.15.1-beta.6 → 4.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -111,11 +111,10 @@ class DropDown extends React.Component {
111
111
  return items.filter(item => item.label.toLowerCase().includes(searchText.toLowerCase()));
112
112
  };
113
113
  this.shouldDisplaySearchField = () => {
114
- var _a;
115
114
  const { items, searchable } = this.props;
116
115
  const defaultQuantityToSearch = 10;
117
116
  return (searchable &&
118
- items.length >= ((_a = searchable.minItemsToSearch) !== null && _a !== void 0 ? _a : defaultQuantityToSearch));
117
+ items.length >= (searchable.minItemsToSearch || defaultQuantityToSearch));
119
118
  };
120
119
  this.renderClosedDropDown = (item, inputStyle) => {
121
120
  const { iconComponent } = this.props;
@@ -202,9 +201,7 @@ class DropDown extends React.Component {
202
201
  justifyContent: this.shouldDisplaySearchField()
203
202
  ? 'flex-start'
204
203
  : 'center',
205
- paddingTop: this.shouldDisplaySearchField() && react_native_1.Platform.OS === 'ios'
206
- ? 44
207
- : 0
204
+ paddingTop: this.shouldDisplaySearchField() && react_native_1.Platform.OS === 'ios' ? 44 : 0
208
205
  },
209
206
  modalContainer: {
210
207
  maxHeight: '95%',
@@ -329,7 +326,7 @@ class DropDown extends React.Component {
329
326
  ] },
330
327
  this.shouldDisplaySearchField() && (React.createElement(react_native_1.View, { style: styles.searchContainer },
331
328
  React.createElement(react_native_1.View, { style: styles.inputWrapper },
332
- React.createElement(react_native_1.TextInput, { style: styles.searchInput, value: searchText, placeholder: searchable === null || searchable === void 0 ? void 0 : searchable.placeHolder, onChangeText: text => this.setState({ searchText: text }) }),
329
+ React.createElement(react_native_1.TextInput, { nativeID: nativeID + '-text-search', style: styles.searchInput, value: searchText, placeholder: searchable && searchable.placeHolder, onChangeText: text => this.setState({ searchText: text }) }),
333
330
  React.createElement(FontAwesome_1.default, { name: "search", size: 16, color: "gray", style: styles.searchIcon })))),
334
331
  filteredItems.length > 0 ? (React.createElement(react_native_1.FlatList, { data: filteredItems, initialNumToRender: filteredItems.length, keyExtractor: item => item.value.toString(), renderItem: ({ item, index }) => {
335
332
  return (React.createElement(DropDownItem, { nativeID: item.nativeID, first: index === 0, last: index === filteredItems.length - 1, label: item.label, value: item.value, onPress: this.handleItemPress, icon: item.icon, iconComponent: iconComponent }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.15.1-beta.6",
3
+ "version": "4.15.1",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [