coreui / coreui-angular

CoreUI Components Library for Angular https://coreui.io/angular/docs/
https://coreui.io/angular/
MIT License
248 stars 146 forks source link

Smart Table tableFilterValue #163

Closed 32x0lf closed 1 year ago

32x0lf commented 1 year ago

I was using the tableFilterValue in SmartTable component like this. [tableFilterValue]="myValue" and initialize the value myValue:string = ' ' I can display the value and passed it in tablefiltervalue input however, I got an error in devtools image How can I fix this?

xidedix commented 1 year ago

@32x0lf We cannot reproduce your issue. Nevertheless, make sure you are on the latest version of coreui-angular-pro.

32x0lf commented 1 year ago

@32x0lf We cannot reproduce your issue. Nevertheless, make sure you are on the latest version of coreui-angular-pro.

What is the latest version for coreui-angular-pro?

32x0lf commented 1 year ago

@xidedix npm install @coreui/angular-pro@latest
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: coreui-pro-angular-admin-template-theme-light-3@4.2.5 npm ERR! Found: @angular/cdk@14.2.7 npm ERR! node_modules/@angular/cdk npm ERR! @angular/cdk@"^14.2.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/cdk@"^15.0.0" from @coreui/angular-pro@4.3.6 npm ERR! node_modules/@coreui/angular-pro npm ERR! @coreui/angular-pro@"4.3.6" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR!

32x0lf commented 1 year ago

Now, I am getting blank page after issuing --force image

How do I fix this?@xidedix

32x0lf commented 1 year ago

I tried to roll back using this command npm install @coreui/angular-pro@4.2.5 still got an error

Please help

xidedix commented 1 year ago

@32x0lf It seems you have been on Angular 14 and you've forced the installation of Angular 15 libraries. No worries, follow the steps:

32x0lf commented 1 year ago

@xidedix

I'm getting an error when running the command npm install


npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: coreui-pro-angular-admin-template-theme-light-3@4.2.5
npm ERR! Found: @angular/cdk@14.2.7
npm ERR! node_modules/@angular/cdk
npm ERR!   @angular/cdk@"^14.2.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cdk@"^15.0.0" from @coreui/angular@4.3.4
npm ERR! node_modules/@coreui/angular
npm ERR!   @coreui/angular@"^4.2.13" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!```

I removed those two folders
![image](https://user-images.githubusercontent.com/21064877/211039647-36fdd66c-05fa-4045-a57a-ff41e20c87e8.png)
xidedix commented 1 year ago

@32x0lf Could you show us what dependencies you have in package.json file? Only @coreui/* part.

32x0lf commented 1 year ago

@xidedix


    "@coreui/angular-chartjs": "~4.2.4",
    "@coreui/angular-pro": "^4.2.5",
    "@coreui/chartjs": "^3.0.0",
    "@coreui/coreui-pro": "^4.4.1",
    "@coreui/icons": "^2.1.0",
    "@coreui/icons-angular": "^4.2.4",
    "@coreui/utils": "^1.3.1",```
xidedix commented 1 year ago

@32x0lf
it should be "~4.2.x" not "^4.2.x"

32x0lf commented 1 year ago

@xidedix

I still get the error

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: coreui-pro-angular-admin-template-theme-light-3@4.2.5
npm ERR! Found: @angular/cdk@14.2.7
npm ERR! node_modules/@angular/cdk
npm ERR!   @angular/cdk@"^14.2.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/cdk@"^15.0.0" from @coreui/angular@4.3.4
npm ERR! node_modules/@coreui/angular
npm ERR!   @coreui/angular@"^4.2.13" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
xidedix commented 1 year ago

@32x0lf error message says, you have @coreui/angular@4.3.4 somewhere in dependencies...

32x0lf commented 1 year ago

@xidedix

I can't find it in package.json image

xidedix commented 1 year ago

@32x0lf
It says you have "@coreui/angular": "^4.2.13"

Remove it. Or change ^ to ~.

32x0lf commented 1 year ago

@32x0lf It says you have "@coreui/angular": "^4.2.13"

Remove it. Or change ^ to ~.

@xidedix

It is working now, thanks, but still I got this error before I updated my version, and you advised me to update to the latest version. How do I update my version? image

xidedix commented 1 year ago

@32x0lf
I believe you're on the latest 4.2.25 for Angular 14.

About your issue - cannot reproduce. How/where do you initialize myValue field?

32x0lf commented 1 year ago

@xidedix Thank you for your help. Your the best . This is solved. I noticed, was passing undefined value for the myValue. again, thank you and have a nice day.