From 4c9569d32a268c908ef05e272e5a22c09e96fddc Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Mon, 8 Jan 2024 20:10:05 -0500 Subject: [PATCH] fix: don't show column header empty title tooltip --- src/slick.grid.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/slick.grid.ts b/src/slick.grid.ts index 44c330a2..0e1c4b94 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -1615,7 +1615,10 @@ export class SlickGrid = Column, O e const headerTarget = this.hasFrozenColumns() ? ((i <= this._options.frozenColumn!) ? this._headerL : this._headerR) : this._headerL; const headerRowTarget = this.hasFrozenColumns() ? ((i <= this._options.frozenColumn!) ? this._headerRowL : this._headerRowR) : this._headerRowL; - const header = Utils.createDomElement('div', { id: `${this.uid + m.id}`, dataset: { id: String(m.id) }, className: 'ui-state-default slick-state-default slick-header-column', title: m.toolTip || '' }, headerTarget); + const header = Utils.createDomElement('div', { id: `${this.uid + m.id}`, dataset: { id: String(m.id) }, className: 'ui-state-default slick-state-default slick-header-column' }, headerTarget); + if (m.toolTip) { + header.title = m.toolTip; + } const colNameElm = Utils.createDomElement('span', { className: 'slick-column-name' }, header); this.applyHtmlCode(colNameElm, m.name as string);