- 0.7.8 introduced a bug with an attempted fix of the iconRenderer. This update addresses that and icons in general.
- the
icons
prop is an object that maps the names and sizes used for the icons (all properties are spread onto theIconRenderer
). In conjunction withIconRenderer
you can now easily switch out the icon library. See Icons section of Readme.
- BREAKING:
IconRenderer
is now required (also note the casing change). The lib no longer depends onreact-native-vector-icons
. For the default Material Icons icon set, you must import Icon fromreact-native-vector-icons/MaterialIcons
yourself, and pass that to theIconRenderer
prop. See Icons section of Readme.
- fix global icon assignment #203
- check for subkey here idk #173
- fix recipe #111
- types definition fixes
- fixed chip padding when using
hideChipRemove
- added
hideChipRemove
boolean prop to hide chips' remove (x) touchable #150
- added type definitions file #63
- remove
ScrollView
that wraps theFlatList
#151 (the style prop remains as scrollView for now but the element is a View)
- remove deprecated
componentWillReceiveProps
#147 - fix subitem
iconRenderer
usage #142
- added
itemsFlatListProps
andsubItemsFlatListProps
to be able to pass in custom FlatList props object
- fixed regression with backdrop / SafeAreaView. Styles:
modalWrapper
wraps the modal andbackdrop
is the backdrop view inside it.
- Added
iconRenderer
prop. Material Icons is no longer required to be installed fo the lib to work. You can passiconRenderer
your own icon component function. - Added Recipes doc with more details customization examples.
- Made readme example more concise
- cleand up example app style
- fixed bug with backdropView +
modalWithTouchable
taking touches from select list. - fixed a couple of cases where items didn't update / future proofed chip remove working inside modal
- added
parentChipsRemoveChildren
boolean prop. If true, pressing a parent chip's remove button will remove all of its selected children. - added
parentChipContainer
andparentChipText
to styles, so you can style parent item chips differently. - added
selectedIconOnLeft
boolean prop. If true, selected icons show to the left of the text. #104 - added
selectedSubItem
to styles
- added
unselectedIconComponent
#93
- added ability to show an icon before the item text #87. Use prop
iconKey
, then add the key to your item as either a string (to show a material iconsIcon
component byname
), object (to show an image e.g {uri: 'imageUrl' }, or a number (that is returned from require('./localimage.png') )). use style keyitemIconStyle
to style the Icon / Image - added
autoFocus
prop (bool) #86, to autofocus the search input when the modal is opened.
- Add
modalWithTouchable
prop. Set to true to wrap the backdrop in aTouchableWithoutFeedback
, which will close the selector (also firesonToggleSelector(false)
) #76
- properly escape regex special chars for test in filter function #64
- Add
hideConfirm
prop - hides the confirm button from the modal #62 - Add
stickyFooterComponent
shows below the confirm button (but, unlikefooterComponent
, outside of the scroll view so it's always visible) - Add
chipsPosition
to position the chips above or below the select. Sstring, either 'top' or 'bottom' #56 - Add
customChipsRenderer
function. receives all props. #56 - Add
modalSafeAreaView
prop. Set to true to use aSafeAreaView
instead of aView
as the backdrop inside theModal
.
- prevent crash when pressing select toggle rapidly
- fix formatting of this document
- Add
onToggleSelector
callback function #48 - Add
noItemsComponent
to be shown when there are no items - Add
loading
boolean prop for loading state
- Change
loadingComponent
to be shown whenloading
prop is true (previously was shown when items were empty)
- Added
keyboardShouldPersistTaps
props where needed
- Add
selectedItemText
andselectedSubItemText
styles (previously only the parent view style was editable when selected).
- Add
chipRemoveIconComponent
, this icon wasn't user replaceable before. - Add
filterItems
function prop. It will replace the filter used for searching. parameters aresearchTerm
,items
,props
. You need to return an array of item objects. (example inexampleapp/App.js
).
- Add
expandDropDowns
prop. Set to true to expand all parent dropdowns (when usingshowDropDowns
). - Add
animateDropDowns
prop. Set to false to not use LayoutAnimation when toggling the dropdowns. - Add
customLayoutAnimation
prop. Use your own LayoutAnimation preset or custom layout animation object for the toggling of dropdowns. - Add
selectLabelNumberOfLines
prop. - Add
renderSelectText
function that receives props. This allows you to fully customize what the select label says and when, overridingselectText
,selectedText
etc.
numberOfLines
is nowitemNumberOfLines
, to avoid confusion.- There were serious perf issues for things like toggling dropdowns with larger lists. To mitigate this, the sub items have been moved inside of the parent items and some functions have been rafactored or moved. The only noticeable difference should be that the parent item's
itemSeparator
shows at the bottom of the group of items, rather than always being directly below the parent item.
- Cast keyExtractor ids to string #31
- Should be generally faster...
- Removed lodash dependency: replaced get and reject functions with internal functions.
alwaysShowSelectText
prop - if true the select label won't show the amount selected +selectedText
or the name of the selected item if only one items is selected. Not applied whensingle
is true as single shows thedispayKey
on the select label only. #23searchAdornment
prop - function that receives the text of the search input, and is output on the right hand side of the search input. Useful if you need to do something with the search text like add a new item.
- disabled items
- sub item Touchable wasn't being disabled when a truthy disabled key is present
- make item text colors.disabled when item has truthy disabled key
- cancel / confirm buttons not displaying properly on iOS. Cancel takes a fixed width instead of a flex ratio now. #19
- Cancel button #15
- shows on the modal to the left of the confirm button. Pressing it dismisses the modal AND removes all selected items.
- show with
showCancelButton
prop. cancelButton
style andcancelIconComponent
are available. (It is a 'close' icon by default, but you could make it a text component if you want).
- Hide select #16
- hide the select entirely with
hideSelect
prop.
- hide the select entirely with
- Display key #14
- customize the title key with
displayKey
prop, instaed of being forced to use 'name'.
- customize the title key with
- Added
headerComponent
prop - goes above search bar #17 - Added
onCancel
andonConfirm
function props
SelectedText
now allowed to be a function, for more complex translations/
- customizable
selectedText
string (defaults to 'selected'). #13
- fixed
onSelectedItemObjectsChange
for single select mode #9
- Added
numberOfLines
prop, so long labels can be truncated (defaults to null - no truncation).
- add flex to label text so checkmark is visible for long items
- Make remove all chip use chipColor
- Add changelog to Readme
- disabled color. When highlightChildren is true, the child checkmarks become the disabled color
- highlighted children TouchableOpacity disabled. You can't / it doesn't make sense to cherry pick sub items in this mode
- Custom component for no results text
noResultsComponent
- More customizable than a string.
- custom component for loading
loadingComponent
- display an ActivityIndicator (default) component when items are empty / undefined
- Custom components for icons
selectToggleIconComponent
- The icon to the right of the dropdown in its initial state (Default arrow down)searchIconComponent
- The search input icon (default Magnifying glass)selectedIconComponent
- The icon to the left of the selected item (default Checkmark)dropDownToggleIconUpComponent
- The parent dropdown icon in closed statedropDownToggleIconDownComponent
- The parent dropdown icon in opened state
- Select all child ids when a parent is selected
selectChildren
- boolean
- Highlight (but don't broadcast to state) all child ids when a parent is selected
highlightChildren
- boolean
- Removed No results text string in favour of a component (object) to allow for more customization.
- removed / streamlined fonts
- Moved row item and sub item to separate classes, in order to enhance performance for long lists. Use
shouldComponentUpdate
to not re-render every item on toggle. - moved RowItem and SubRowItem into separate files
- fixed
reduceSelected
function - rejecting children works properly now - Erroneously used
item.id
instead ofitem[uniqueKey]
hideSearch
Prop to hide search bar entirely
- Style for sub item separator
- Props for Modal animation and orientation
- Init