-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Typescript] Fix ListContextProvider types #8020
Conversation
@@ -219,7 +219,7 @@ export interface ListControllerResult<RecordType extends RaRecord = any> { | |||
onUnselectItems: () => void; | |||
page: number; | |||
perPage: number; | |||
refetch: UseGetListHookValue<RecordType>['refetch']; | |||
refetch: (() => void) | UseGetListHookValue<RecordType>['refetch']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the (() => void)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done to continue the compatibility between ListContext
and ChoicesContext
for DatagridInput
@@ -24,7 +25,7 @@ export type ChoicesContextValue<RecordType extends RaRecord = any> = { | |||
isLoading: boolean; | |||
page: number; | |||
perPage: number; | |||
refetch: () => void; | |||
refetch: (() => void) | UseGetListHookValue<RecordType>['refetch']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why UseGetListHookValue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idem -> Done to continue the compatibility between ListContext
and ChoicesContext
for DatagridInput
No description provided.