@codeleap/mobile 3.2.11 → 3.2.14

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "3.2.11",
3
+ "version": "3.2.14",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -75,6 +75,7 @@ export const Autocomplete = <T extends string|number = string, Multi extends boo
75
75
  filterItems = defaultFilterFunction,
76
76
  searchInputProps: searchProps = {},
77
77
  onItemPressed = () => {},
78
+ listPlaceholder,
78
79
  style,
79
80
  ...listProps
80
81
  } = allProps
@@ -117,8 +118,6 @@ export const Autocomplete = <T extends string|number = string, Multi extends boo
117
118
 
118
119
  const listStyles = useNestedStylesByKey('list', variantStyles)
119
120
 
120
- const searchInputStyles = useNestedStylesByKey('searchInput', variantStyles)
121
-
122
121
  const currentOptions = searchable ? filteredOptions : defaultOptions
123
122
 
124
123
  const select = (selectedValue) => {
@@ -212,7 +211,6 @@ export const Autocomplete = <T extends string|number = string, Multi extends boo
212
211
  debounce={!!loadOptions ? 800 : null}
213
212
  onSearchChange={onChangeSearch}
214
213
  hideErrorMessage
215
- styles={searchInputStyles}
216
214
  {...searchProps}
217
215
  />
218
216
 
@@ -225,9 +223,7 @@ export const Autocomplete = <T extends string|number = string, Multi extends boo
225
223
  keyExtractor={(i) => i.value}
226
224
  renderItem={renderListItem}
227
225
  fakeEmpty={loading}
228
- placeholder={{
229
- loading,
230
- }}
226
+ loading={loading}
231
227
  {...listProps}
232
228
  />
233
229
  </View>
@@ -13,16 +13,13 @@ import { Text } from '../Text'
13
13
  import { SearchInputProps, TextInputProps } from '../TextInput'
14
14
  import { Touchable } from '../Touchable'
15
15
  import { AutocompleteComposition } from './styles'
16
-
17
- type AutocompleteOption<T = any> = FormTypes.Options<T> & {
18
- item?: any
19
- }
16
+ import { EmptyPlaceholderProps } from '../EmptyPlaceholder'
20
17
 
21
18
  export type AutocompleteRenderFNProps<T> = {
22
19
  styles: StylesOf<AutocompleteComposition>
23
20
  onPress: () => void
24
21
  isSelected?: boolean
25
- item: AutocompleteOption<T>[number]
22
+ item: FormTypes.Options<T>[number]
26
23
  touchableProps?: Partial<PropsOf<typeof Touchable>>
27
24
  textProps?: Partial<PropsOf<typeof Text>>
28
25
  iconProps?: Partial<PropsOf<typeof Icon>>
@@ -72,6 +69,7 @@ export type AutocompleteProps<T = any, Multi extends boolean = false> = {
72
69
  searchInputProps?: Partial<SearchInputProps>
73
70
  debugName: string
74
71
  searchComponent?: React.ComponentType<SearchInputProps>
72
+ listPlaceholder?: Partial<EmptyPlaceholderProps>
75
73
  }
76
74
  & Omit<FlatListProps<T>, 'renderItem'|'styles'|'style'>
77
75
  & ComponentVariants<typeof AutocompletePresets>