-2
Hello, I’m trying to create a Search Component and when I search for example full name it return me the full name, but it only returns me the name example: [I type] Victor - He returns Victor, but if I type "Victor Santos" He doesn’t call me back. In short, I would like to know if Regexp can return the full name
function onSearch(e: any) {
const search = e.target.value
const searchFilter = myhook.data.filter((item: any) => {
return !item.name.search(new RegExp(search, 'gi'))
})
}
Victor, there is a lot of information missing in your example code, people who will try to help you will not be able to reproduce your scenario, I suggest you set an example that works and that reproduces your error in the code attached to the question
– Paz