react-use-flexsearch icon indicating copy to clipboard operation
react-use-flexsearch copied to clipboard

rawResults.map is not a function when use Pagination option

Open IgordeOliveira opened this issue 4 years ago • 2 comments

When I pass the paging option to hook, it returns this error to me my code:

  const results = useFlexSearch(searchTerm, index, JSON.parse(store), {
    limit: 5,
    page: true
  })

most likely because when I use page: true it returns me an object instead of an array https://github.com/nextapps-de/flexsearch#pagination

IgordeOliveira avatar Jul 02 '20 18:07 IgordeOliveira

#14 Just submitted a fix. Unfortunately, I'm not all that familiar with how to contribute to other projects so I'm assuming that we wait for the owner to merge it in?

Jixabon avatar Aug 03 '20 04:08 Jixabon

nice, that's right, the repo owner needs to approve the merge request

IgordeOliveira avatar Aug 03 '20 18:08 IgordeOliveira