Closed michapixel closed 1 year ago
Correct, thank you very much. I just applied your fix and reposted to npm.
I will look to allow passing a function as a parameter of search()
. seems pretty consistent
The search function handles nested objects recursively. (same for filters).
Moreover we can specify a scope to limit the columns searched
const scope = [ 'last_name', 'first_name', 'pets' ]
handler.search(value, scope)
The search function handles nested objects recursively. (same for filters).
Moreover we can specify a scope to limit the columns searched
const scope = [ 'last_name', 'first_name', 'pets' ] handler.search(value, scope)
Is it possible to add nested data to the scope? We're using graphql, so our data comes back heavily nested. I haven't had much luck sorting or searching the columns that use nested properties.
in the current implementation this is not possible.
What would be needed is another method eg handler.customSearch(params)
It is now possible to define a callback inside the scope array . Since 1.12.1
.
This allows to manage nested properties.
const scope = [
'last_name',
'first_name',
(row) => row.nestedProp.key
]
handler.search(value, scope)
What fixed it for me was: changed ca line 35 of Context.js from
TO
is there a way to intervene witrh the search functionality? like the filter function ....