You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have some use cases where we need to interrogate the grid for its internal state. At the moment we are using a solution that looks like this:
import{createSnapshotHook,createHook}from'grid-hook-component'consthook=createHook(callback)functioncallback(rows,columns){// some side effect}myGrid.use(createSnapshotHook().hook(hook))
Then further down in our application we can request a snapshot at any time, and it will be handled by the hook's callback:
hook.requestSnapshot()
In #7 we discussed this might make more sense to do at the grid level. Is that the case? I think it might be a good idea to implement it as a component. I can see at least 2 use cases for a hook component:
You can define many different hooks and pass them to the grid to query the state at different times
You can define a single hook and process in many different ways (ala middleware) by several consumer.
Thoughts?
The text was updated successfully, but these errors were encountered:
We have some use cases where we need to interrogate the grid for its internal state. At the moment we are using a solution that looks like this:
Then further down in our application we can request a snapshot at any time, and it will be handled by the hook's callback:
In #7 we discussed this might make more sense to do at the grid level. Is that the case? I think it might be a good idea to implement it as a component. I can see at least 2 use cases for a hook component:
Thoughts?
The text was updated successfully, but these errors were encountered: