From d6848d7a1513b68ad632e7570b1b3399d559dd58 Mon Sep 17 00:00:00 2001 From: "fabio.mussi" Date: Wed, 3 Feb 2021 11:40:06 -0300 Subject: [PATCH 1/3] added property to change the label when search dont return any item --- lib/react-native-multi-select.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/react-native-multi-select.js b/lib/react-native-multi-select.js index de80a20..bac21c1 100644 --- a/lib/react-native-multi-select.js +++ b/lib/react-native-multi-select.js @@ -83,7 +83,8 @@ export default class MultiSelect extends Component { filterMethod: PropTypes.string, onClearSelector: PropTypes.func, onToggleList: PropTypes.func, - removeSelected: PropTypes.bool + removeSelected: PropTypes.bool, + noItemText: PropTypes.string }; static defaultProps = { @@ -119,7 +120,8 @@ export default class MultiSelect extends Component { onAddItem: () => {}, onClearSelector: () => {}, onToggleList: () => {}, - removeSelected: false + removeSelected: false, + noItemText: 'No item to display.' }; constructor(props) { @@ -526,7 +528,7 @@ export default class MultiSelect extends Component { fontFamily ? { fontFamily } : {} ]} > - No item to display. + {this.props.noItemText} ); From 3e4c4ae047ae54f33cc820dde2cd01b7dd71c94b Mon Sep 17 00:00:00 2001 From: "fabio.mussi" Date: Wed, 3 Feb 2021 11:48:24 -0300 Subject: [PATCH 2/3] added property to change the label when search dont return any item --- index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/index.d.ts b/index.d.ts index c3d9db8..c13abea 100644 --- a/index.d.ts +++ b/index.d.ts @@ -49,6 +49,7 @@ export interface MultiSelectProps { textInputProps?: TextInputProps; flatListProps?: FlatListProps; filterMethod?: string; + noItemText?: string; } export default class MultiSelect extends React.Component { From fcd26efe5724d684adebf15454fa7f77b4ae7f10 Mon Sep 17 00:00:00 2001 From: "fabio.mussi" Date: Wed, 3 Feb 2021 11:56:59 -0300 Subject: [PATCH 3/3] added property to change the label when search dont return any item --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c24854a..a91ad5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-multiple-select", - "version": "0.5.6", + "version": "0.5.7", "description": "Simple multi-select component for react-native", "main": "index.js", "scripts": {