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

Is there a way to enable search with a colon ( : ) #36

Open
correadevuk opened this issue Sep 25, 2020 · 0 comments
Open

Is there a way to enable search with a colon ( : ) #36

correadevuk opened this issue Sep 25, 2020 · 0 comments

Comments

@correadevuk
Copy link

correadevuk commented Sep 25, 2020

Hi,

Amazing library, thanks.

I'm trying to implement a search by MAC address, but after I type a colon, the results go blank. It does work with other characters like dash (-) but not happening with a colon. Am I doing something wrong? Is there a way to enable search with a colon ( : )?

Search term: "B7:27:EB:4C:A6:FE"

`
const [criteria, setCriteria] = useState([]);

<SearchInput
onChangeText={(text) => setText(text)}
style={global.input}
placeholder="Search"
clearIcon={
<FontAwesomeIcon
icon={!text ? 'search' : 'times-circle'}
size=20
style={global.searchTimes}
/>
}
inputViewStyles={global.searchBar}
clearIconViewStyles={global.searchIconContainer}
/>

<FlatList
data={data.filter(createFilter(text, criteria))}
...
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant