@@ -38,37 +38,39 @@ export interface Styles {
38
38
listContainer ?: ReactNative . StyleProp < ReactNative . ViewStyle >
39
39
}
40
40
41
+ export interface Colors {
42
+ primary ?: string
43
+ success ?: string
44
+ cancel ?: string
45
+ text ?: string
46
+ subText ?: string
47
+ selectToggleTextColor ?: string
48
+ searchPlaceholderTextColor ?: string
49
+ searchSelectionColor ?: string
50
+ chipColor ?: string
51
+ itemBackground ?: string
52
+ subItemBackground ?: string
53
+ disabled ?: string
54
+ }
55
+
41
56
export interface SectionedMultiSelectProps < ItemType > {
42
57
single ?: boolean
43
58
selectedItems ?: any [ ]
44
59
items ?: ItemType [ ]
45
60
displayKey ?: string
46
61
uniqueKey : string
47
62
subKey ?: string
48
- onSelectedItemsChange : ( items : ItemType [ ] ) => void
63
+ onSelectedItemsChange : ( items : any [ ] ) => void
49
64
showDropDowns ?: boolean
50
65
showChips ?: boolean
51
66
readOnlyHeadings ?: boolean
52
67
selectText ?: string
53
68
selectedText ?: string | ( ( ) => void )
54
- renderSelectText ?: ( props : object ) => void
69
+ renderSelectText ?: ( props : this ) => void
55
70
confirmText ?: string
56
71
hideConfirm ?: boolean
57
72
styles ?: Styles
58
- colors ?: {
59
- primary ?: string
60
- success ?: string
61
- cancel ?: string
62
- text ?: string
63
- subText ?: string
64
- selectToggleTextColor ?: string
65
- searchPlaceholderTextColor ?: string
66
- searchSelectionColor ?: string
67
- chipColor ?: string
68
- itemBackground ?: string
69
- subItemBackground ?: string
70
- disabled ?: string
71
- }
73
+ colors ?: Colors
72
74
searchPlaceholderText ?: string
73
75
noResultsComponent ?: React . ReactNode
74
76
loadingComponent ?: React . ReactNode
@@ -113,18 +115,29 @@ export interface SectionedMultiSelectProps<ItemType> {
113
115
filterItems ?: ( searchTerm : string ) => void
114
116
onToggleSelector ?: ( selected : boolean ) => void
115
117
noItemsComponent ?: React . ReactNode
116
- customChipsRenderer ?: ( chipProperties : object ) => void
118
+ customChipsRenderer ?: ( chipProperties : {
119
+ colors : Colors
120
+ displayKey : string
121
+ items : ItemType [ ]
122
+ selectedItems : any [ ]
123
+ styles : Styles
124
+ subKey : string
125
+ uniqueKey : string
126
+ } ) => void
117
127
chipsPosition ?: 'top' | 'bottom'
118
128
autoFocus ?: boolean
119
129
iconKey ?: string
120
130
disabled ?: boolean
121
131
selectedIconOnLeft ?: boolean
122
132
parentChipsRemoveChildren ?: boolean
123
133
hideChipRemove ?: boolean
124
- IconRenderer ?: React . ReactNode
125
- itemsFlatListProps ?: Omit < ReactNative . FlatListProps < T > , 'data' | 'renderItem' >
134
+ IconRenderer : React . ReactNode
135
+ itemsFlatListProps ?: Omit <
136
+ ReactNative . FlatListProps < ItemType > ,
137
+ 'data' | 'renderItem'
138
+ >
126
139
subItemsFlatListProps ?: Omit <
127
- ReactNative . FlatListProps < T > ,
140
+ ReactNative . FlatListProps < ItemType > ,
128
141
'data' | 'renderItem'
129
142
>
130
143
@@ -144,7 +157,7 @@ export default class SectionedMultiSelect<ItemType> extends React.Component<
144
157
_removeAllItems : ( ) => void
145
158
_removeItem : ( item : ItemType ) => void
146
159
_selectAllItems : ( ) => void
147
- _findItem : ( id : string | number ) => ItemType | object | undefined
160
+ _findItem : ( id : any ) => ItemType | undefined
148
161
_itemSelected : ( item : ItemType ) => boolean
149
162
_getSearchTerm : ( ) => string
150
163
_submitSelection : ( ) => void
0 commit comments