Skip to content
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

Merged
merged 6 commits into from
Jul 29, 2022
Merged

Conversation

antoinefricker
Copy link
Contributor

No description provided.

@@ -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'];
Copy link
Collaborator

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)

Copy link
Contributor Author

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'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why UseGetListHookValue?

Copy link
Contributor Author

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

@djhi djhi added this to the 4.2.5 milestone Jul 29, 2022
@djhi djhi merged commit d54494c into master Jul 29, 2022
@djhi djhi deleted the ListContextProvider-types branch July 29, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants