coreui/coreui-angular

Smart Table tableFilterValue

32x0lf opened this issue · 17 comments

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?

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

@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?

@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!

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

How do I fix this?@xidedix

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

Please help

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

  • remove node-modules folder completely
  • remove .angular folder completely
  • remove package-lock.json file
  • edit package.json file to make sure all @angular/* dependencies shows version ^14.2 and @coreui/angular-pro shows version ~4.2
  • run npm install without force flag

@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)


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

@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",```

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

  • "@coreui/angular-pro": "~4.2.25"
  • "coreui/icons-angular": "~4.2.4"

@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!

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

@xidedix

I can't find it in package.json
image

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

Remove it. Or change ^ to ~.

@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

@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?

@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.