react-grid-table icon indicating copy to clipboard operation
react-grid-table copied to clipboard

Search API: No access to data object possible

Open SmartArray opened this issue 2 years ago • 0 comments

While using the search API, I was noticing that there is no way of accessing the data item in the custom search callbacks because it is not passed to the callback: https://github.com/NadavShaar/react-grid-table/blob/5e5ac476212dfbb51c4d438b57397dc8c3c28b33/src/hooks/useSearch.jsx#L58-L61

Is there a reason why we don't pass the original data to the callback?

IMO, it should be accessible, especially because some columns might represent nested objects or arrays that are displayed using a quick summary (such as: "5 items") but the search function should actually have access to the array.

Is it worth a PR?

SmartArray avatar Jun 18 '23 06:06 SmartArray