diff --git a/slickgrid/slick.autotooltips-tests.ts b/slickgrid/slick.autotooltips-tests.ts new file mode 100644 index 000000000..f2e7f6f39 --- /dev/null +++ b/slickgrid/slick.autotooltips-tests.ts @@ -0,0 +1,8 @@ +/// + +var grid = new Slick.Grid("#myGrid", [], [], {}); +grid.registerPlugin(new Slick.AutoTooltips({ + enableForCells: true, + enableForHeaderCells: true, + maxToolTipLength: 100 +})); diff --git a/slickgrid/slick.autotooltips.d.ts b/slickgrid/slick.autotooltips.d.ts new file mode 100644 index 000000000..34e761754 --- /dev/null +++ b/slickgrid/slick.autotooltips.d.ts @@ -0,0 +1,35 @@ +// Type definitions for SlickGrid AutoToolTips Plugin 2.1.0 +// Project: https://github.com/mleibman/SlickGrid +// Definitions by: Ryo Iwamoto +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module Slick { + export interface SlickGridAutoTooltipsOption extends PluginOptions { + /** + * Enable tooltip for grid cells + * @default true + */ + enableForCells?: boolean; + + /** + * Enable tooltip for header cells + * @default false + */ + enableForHeaderCells?: boolean; + + /** + * The maximum length for a tooltip + * @default null + */ + maxToolTipLength?: number; + } + + /** + * AutoTooltips plugin to show/hide tooltips when columns are too narrow to fit content. + */ + export class AutoTooltips extends Plugin { + constructor(option?: SlickGridAutoTooltipsOption); + } +}