Author Topic: tsc error in TypeScript "widget().pqTooltip()"  (Read 2345 times)

ohbayashi

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 41
    • View Profile
tsc error in TypeScript "widget().pqTooltip()"
« on: March 05, 2018, 03:53:07 pm »
Please tell me if you have the best way to write event handling.

pqgrid ver. 5.1.0

abc.ts
Code: [Select]
/// <reference path="../../types/pqgrid.d.ts" />

namespace aaa {
    class PqgridAbc {
        public grid: pq.gridT.instance;

        constructor() {
            this.grid = pq.grid("#gridMain", this.gridObj);
        }

        public gridObj: pq.gridT.options = {
            height: "100%-10",
            width: "100%-10",
            :
            create: (evt, ui) => {
                // validation warn.
                this.grid.widget().pqTooltip();     <- error.1
        }
    }
    const pqAbc = new PqgridAbc;
}

error.1
Code: [Select]
error TS2551: Property 'pqTooltip' does not exist on type 'JQuery<HTMLElement>'. Did you mean 'tooltip'?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6298
    • View Profile
Re: tsc error in TypeScript "widget().pqTooltip()"
« Reply #1 on: March 06, 2018, 12:20:07 am »
this inside event is the grid itself

Code: [Select]
create: function(){
       this.widget().pqTooltip();
}

ohbayashi

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: tsc error in TypeScript "widget().pqTooltip()"
« Reply #2 on: March 09, 2018, 02:32:48 pm »
Thank you.