ParamQuery grid support forum

General Category => Bug Report => Topic started by: ferpagano on January 12, 2023, 12:04:25 am

Title: Tooltip show / hide error
Post by: ferpagano on January 12, 2023, 12:04:25 am
Hello,

I'm using pgGrid (v8.7,0) with column validation inside an Angular v13(13.3.12) App. When the validator fires It should show the tooltip but It's throwing a TypeError. The line that has the problem is (jquery-ui):
"options.complete = callback;"
The variable "options" is a boolean, and I think problem is related to strict mode because when I tried a similar line without strict mode, it ran fine.

jquery -> v3.4.0
jquery-ui-pack -> v1.12.3

Thanks in advance.
Fernando.

TypeError: Cannot create property 'complete' on boolean 'true'
Error:
core.mjs:7739
ERROR TypeError: Cannot create property 'complete' on boolean 'true'
at $.Widget. [as _show] (jquery-ui.js:716:3)
at $..._open (jquery-ui.js:15926:8)
at $..._open (jquery-ui.js:139:25)
at $..._updateContent (jquery-ui.js:15855:9)
at $..._updateContent (jquery-ui.js:139:25)
at Object. (jquery-ui.js:15732:10)
at Function.each (jquery.js:391:19)
at $..._setOption (jquery-ui.js:15731:6)
at $..._setOption (jquery-ui.js:139:25)
at $..._setOptions (jquery-ui.js:429:9)
Title: Re: Tooltip show / hide error
Post by: paramvir on January 12, 2023, 07:22:47 am
It would be greatly appreciated if you can please share a small test case in stackblitz.
Title: Re: Tooltip show / hide error
Post by: ferpagano on January 12, 2023, 08:41:16 am
Hello!,

Thanks for your answer.

I'm unable to reproduce it on StackBlitz. It doesn't throw the exception and somehow it seems to have forced strict mode to be disabled.
https://stackblitz.com/edit/paramquery-ng-switch-data-7vvrr8?file=tsconfig.json (https://stackblitz.com/edit/paramquery-ng-switch-data-7vvrr8?file=tsconfig.json)

I have repo below containing a similar solution that can be used to reproduce the error in a local enviroment.
https://github.com/ferpagano/prueba_pqgrid (https://github.com/ferpagano/prueba_pqgrid)

I also reached out to the jQuery UI team, here are their answers related:
https://github.com/jquery/jquery-ui/issues/2148 (https://github.com/jquery/jquery-ui/issues/2148)
https://github.com/jquery/jquery-ui/pull/1931 (https://github.com/jquery/jquery-ui/pull/1931)

Thanks in advance.
Fernando.
Title: Re: Tooltip show / hide error
Post by: paramvir on January 12, 2023, 12:59:56 pm
Fernando

Thank you for the much useful information. I'm looking into it.
Title: Re: Tooltip show / hide error
Post by: paramvir on January 13, 2023, 02:00:43 pm
Hi Fernando

jquery-ui-pack version 1.13.2 has been published.

https://www.npmjs.com/package/jquery-ui-pack

Please recheck your project with latest version of jquery-ui-pack
Title: Re: Tooltip show / hide error
Post by: ferpagano on January 13, 2023, 11:40:54 pm
Excellent  8)

Thanks.