OnChanged and OnChanging event for UseQuery<T>
?
#6960
david-driscoll
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently trying to make use of the OnQuery generated classes from StrawberryShake and I'm running into one small issue working with a DataGrid component.
I have no way to be notified when the data changes, or when the user has requested a data change. In this case I have to call a method on the PaginationState, so that I can show the correct paging state in the UI. To do this I need access to the result from the query.
I am able to work around it somewhat by assigning the context value from the
ChildContent
of the class, but there is no good way (that I'm aware of) to know that the data has changed from the component itself.Would it be possible to get two additional parameters added to the base class? Unless there are some other options I should look for.
Note: In regards for an OnChanging event, it's possible to handle this in the caller (eg, set a "loading" parameter), it requires whenever we make a state change to the component to also make the change for loading. It would more convenient to just do that in the event that is triggered by the component.
Beta Was this translation helpful? Give feedback.
All reactions