Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the label when search dont return any item #162

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions index.d.ts
Expand Up @@ -49,6 +49,7 @@ export interface MultiSelectProps {
textInputProps?: TextInputProps;
flatListProps?: FlatListProps<any>;
filterMethod?: string;
noItemText?: string;
}

export default class MultiSelect extends React.Component<MultiSelectProps> {
Expand Down
8 changes: 5 additions & 3 deletions lib/react-native-multi-select.js
Expand Up @@ -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 = {
Expand Down Expand Up @@ -119,7 +120,8 @@ export default class MultiSelect extends Component {
onAddItem: () => {},
onClearSelector: () => {},
onToggleList: () => {},
removeSelected: false
removeSelected: false,
noItemText: 'No item to display.'
};

constructor(props) {
Expand Down Expand Up @@ -526,7 +528,7 @@ export default class MultiSelect extends Component {
fontFamily ? { fontFamily } : {}
]}
>
No item to display.
{this.props.noItemText}
</Text>
</View>
);
Expand Down
2 changes: 1 addition & 1 deletion 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": {
Expand Down