refine
refine copied to clipboard
[FEAT] Update `@ant-design/charts` package to v2 for examples
Is your feature request related to a problem? Please describe.
Due to dependency issues with @ant-design/charts@1, we are having installation issues. We have .npmrc file to workaround this issue, but it's not ideal.
Describe alternatives you've considered
No response
Additional context
No response
Describe the thing to improve
- Update
@ant-design/chartspackage tov2in the following examples and remove.npmrc:
-
Test these applications by running locally and make sure they work as expected.
-
Check if their blog posts needs to be updated:
https://github.com/refinedev/refine/blob/master/documentation/blog/2021-11-12-issue-tracker-refine.md
https://github.com/refinedev/refine/blob/master/documentation/blog/2023-04-06-finefood-admin-dashboard.md
Hello, if i am allowed to take this task, i would like to assign it to myself to do it. Thanks for your understanding
Hello @devhik0 assigned this issue to you. Looking forward to your PR!
Here is PR to check its details. #5523
Hey @BatuhanW, i solved that ENV problem via installing cross-env to package.json at root. But now same command still failing due to type error, i ll show it below, hope it helps to understand problem better. This logs coming from nx at terminal also.
[Package: @refinedev/antd, build: fail]
> cli run build --include-dependencies --scope @refinedev/core --scope @refinedev/antd --scope base-antd --includeDependencies
CLI Target: node14
ESM Build start
CJS Build start
IIFE Build start
ESM dist\esm\index.js 81.86 KB
ESM dist\esm\index.js.map 385.65 KB
ESM ⚡️ Build success in 4467ms
CJS dist\index.js 85.31 KB
CJS dist\index.js.map 373.55 KB
CJS ⚡️ Build success in 4518ms
IIFE dist\iife\index.js 215.42 KB
IIFE dist\iife\index.js.map 1.13 MB
IIFE ⚡️ Build success in 4644ms
src/components/table/components/filterDropdown/index.tsx(86,17): error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '{ onChange: (e: any) => void; value: any; }' is not assignable to parameter of type 'Partial<unknown> & Attributes'.
Object literal may only specify known properties, and 'onChange' does not exist in type 'Partial<unknown> & Attributes'.
src/hooks/table/useTable/useTable.ts(251,13): error TS2322: Type '(paginationState: TablePaginationConfig, tableFilters: Record<string, (string | number | boolean) | (string | number | boolean)[] | null>, sorter: SorterResult<any> | SorterResult<any>[]) => void' is not assignable to type '(pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<TData> | SorterResult<...>[], extra: TableCurrentDataSource<...>) => void'.
Types of parameters 'tableFilters' and 'filters' are incompatible.
Type 'Record<string, FilterValue | null>' is not assignable to type 'Record<string, string | number | boolean | (string | number | boolean)[] | null>'.
'string' index signatures are incompatible.
Type 'FilterValue | null' is not assignable to type 'string | number | boolean | (string | number | boolean)[] | null'.
ELIFECYCLE Command failed with exit code 2
In same file there is a TS error shows that:
No overload matches this call.
The last overload gave the following error.
Object literal may only specify known properties, and 'onChange' does not exist in type 'Partial<unknown> & Attributes'.ts(2769)
86 | const childrenWithProps = React.Children.map(children, (child) => {
if (React.isValidElement(child)) {
return React.cloneElement(child, {
onChange, <---
value: mappedValue(value),
});
}
return child;
});
Hope it helps.
Hey @BatuhanW, i solved that ENV problem via installing
cross-envto package.json at root. But now same command still failing due to type error, i ll show it below, hope it helps to understand problem better. This logs coming from nx at terminal also.[Package: @refinedev/antd, build: fail]> cli run build --include-dependencies --scope @refinedev/core --scope @refinedev/antd --scope base-antd --includeDependenciesCLI Target: node14 ESM Build start CJS Build start IIFE Build start ESM dist\esm\index.js 81.86 KB ESM dist\esm\index.js.map 385.65 KB ESM ⚡️ Build success in 4467ms CJS dist\index.js 85.31 KB CJS dist\index.js.map 373.55 KB CJS ⚡️ Build success in 4518ms IIFE dist\iife\index.js 215.42 KB IIFE dist\iife\index.js.map 1.13 MB IIFE ⚡️ Build success in 4644ms src/components/table/components/filterDropdown/index.tsx(86,17): error TS2769: No overload matches this call. The last overload gave the following error. Argument of type '{ onChange: (e: any) => void; value: any; }' is not assignable to parameter of type 'Partial<unknown> & Attributes'. Object literal may only specify known properties, and 'onChange' does not exist in type 'Partial<unknown> & Attributes'. src/hooks/table/useTable/useTable.ts(251,13): error TS2322: Type '(paginationState: TablePaginationConfig, tableFilters: Record<string, (string | number | boolean) | (string | number | boolean)[] | null>, sorter: SorterResult<any> | SorterResult<any>[]) => void' is not assignable to type '(pagination: TablePaginationConfig, filters: Record<string, FilterValue | null>, sorter: SorterResult<TData> | SorterResult<...>[], extra: TableCurrentDataSource<...>) => void'. Types of parameters 'tableFilters' and 'filters' are incompatible. Type 'Record<string, FilterValue | null>' is not assignable to type 'Record<string, string | number | boolean | (string | number | boolean)[] | null>'. 'string' index signatures are incompatible. Type 'FilterValue | null' is not assignable to type 'string | number | boolean | (string | number | boolean)[] | null'. ELIFECYCLE Command failed with exit code 2In same file there is a TS error shows that:
No overload matches this call. The last overload gave the following error. Object literal may only specify known properties, and 'onChange' does not exist in type 'Partial<unknown> & Attributes'.ts(2769)86 | const childrenWithProps = React.Children.map(children, (child) => { if (React.isValidElement(child)) { return React.cloneElement(child, { onChange, <--- value: mappedValue(value), }); } return child; });Hope it helps.
For support, you can use our discord channel or discussions section. Let's not add off-topic comments to the issues. Make sure you run npm ci and npm run coffee after installation. If you are using pnpm, it could be an issue with that. Can't tell for sure.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.