Skip to content

Commit edd0eae

Browse files
committed
feat: include tag container style
1 parent b0b01e9 commit edd0eae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/react-native-multi-select.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export default class MultiSelect extends Component {
4040
uniqueKey: PropTypes.string,
4141
tagBorderColor: PropTypes.string,
4242
tagTextColor: PropTypes.string,
43+
tagContainerStyle: ViewPropTypes.style,
4344
tagFontSize: PropTypes.number,
4445
fontFamily: PropTypes.string,
4546
tagRemoveIconColor: PropTypes.string,
@@ -171,9 +172,10 @@ export default class MultiSelect extends Component {
171172
return find(items, singleItem => singleItem[uniqueKey] === itemKey) || {};
172173
};
173174

174-
_displaySelectedItems = optionalSelctedItems => {
175+
_displaySelectedItems = optionalSelectedItems => {
175176
const {
176177
fontFamily,
178+
tagContainerStyle,
177179
tagRemoveIconColor,
178180
tagBorderColor,
179181
tagFontSize,
@@ -182,7 +184,7 @@ export default class MultiSelect extends Component {
182184
selectedItems,
183185
displayKey
184186
} = this.props;
185-
const actualSelectedItems = optionalSelctedItems || selectedItems;
187+
const actualSelectedItems = optionalSelectedItems || selectedItems;
186188
return actualSelectedItems.map(singleSelectedItem => {
187189
const item = this._findItem(singleSelectedItem);
188190
if (!item[displayKey]) return null;
@@ -195,7 +197,8 @@ export default class MultiSelect extends Component {
195197
justifyContent: 'center',
196198
height: 40,
197199
borderColor: tagBorderColor
198-
}
200+
},
201+
tagContainerStyle || {}
199202
]}
200203
key={item[uniqueKey]}
201204
>

0 commit comments

Comments
 (0)