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

fix return types of some functions #494

Merged
merged 15 commits into from
Jun 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' of github.com:pankod/refine into explicit-modul…
…e-boundary-types
  • Loading branch information
umutzd committed May 28, 2021
commit 95a8b2dddeb83941efb8483e2c42426260f3b151
11 changes: 0 additions & 11 deletions example/src/components/pages/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ export const PostList: React.FC<IResourceComponentsProps> = (props) => {
],
});

const { data: dataTest } = useList("posts", {
pagination: { current: 3, pageSize: 8 },
filters: [
{
field: "status",
operator: "eq",
value: "rejected",
},
],
});

const categoryIds =
tableProps?.dataSource?.map((item) => item.category.id) ?? [];

Expand Down
11 changes: 1 addition & 10 deletions packages/core/src/definitions/table/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,7 @@ export const merge = <T>(object: T, source: T): T => {
});
};

export type ParseTableParamsType = {
(url: string): {
parsedCurrent: number | "" | undefined;
parsedPageSize: number | "" | undefined;
parsedSorter: SorterResult<any>[];
parsedFilters: CrudFilters;
}
}

export const parseTableParams: ParseTableParamsType = (url) => {
export const parseTableParams = (url: string) => {
const { current, pageSize, sort, order, ...filters } = qs.parse(
url.substring(1), // remove first ? character
);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.